Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix this freeze script for my admin panel?

Asked by 3 years ago

I am working on a freeze command, but this is not working. It is supposed to freeze a selected user when i click a button.

local targetName = script.Parent.Parent.TextBox.Text
local target = game.Players:FindFirstChild(targetName)
local rootPart = target.Character:WaitForChild("HumanoidRootPart")

script.Parent.MouseButton1Click:Connect(function()
    rootPart.Anchored = true
end)

Answer this question