RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"script a tool that makes the player shrink when player left clicks with tool equipped."
-- local script inside the tool local tool = script.Parent local mouse = nil local function shrinkPlayer() local player = game.Players.LocalPlayer local character = player.Character if character then character:SetPrimaryPartCFrame(character.PrimaryPart.CFrame * CFrame.new(0, -character.PrimaryPart.Size.Y / 2, 0)) character.PrimaryPart.Size = character.PrimaryPart.Size / 2 for _, part in ipairs(character:GetChildren()) do if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then part.Size = part.Size / 2 part.CFrame = part.CFrame * CFrame.new(0, -part.Size.Y / 2, 0) end end end end local function onMouseDown() if mouse then shrinkPlayer() end end tool.Equipped:Connect(function(input) mouse = input mouse.Button1Down:Connect(onMouseDown) end) tool.Unequipped:Connect(function() mouse = nil end)