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)