This LocalScript is located in StarterGui.ScreenGui.ImageButton.Frame.TextButton
script.Parent.MouseButton1Click:Connect(function()
game:WaitForChild("EmoteFreeze", 2)
local emotelimit = workspace.Parent.EmoteFreeze
if emotelimit.Disabled == false then
emotelimit.Disabled = true
else
emotelimit.Disabled = false
end
wait(0.1)
emotelimit.Disabled = false
end)
The script above activates this LocalScript, location in StarterCharacterScripts
local human = script.Parent.Humanoid
human.AutoRotate = false
human.WalkSpeed = 0
human.JumpPower = 0
wait(3)
human.AutoRotate = true
human.WalkSpeed = 12
human.JumpPower = 20
It basically freezes my character so it cannot move or rotate, and when I clicked the button it tells me this in the output "EmoteFreeze is not a valid member of DataModel"
And this is the working script, but I think it only activates for me:
script.Parent.MouseButton1Click:Connect(function()
game:WaitForChild("EmoteFreeze", 2)
local emotelimit = workspace.Aldovy.EmoteFreeze
if emotelimit.Disabled == false then
emotelimit.Disabled = true
else
emotelimit.Disabled = false
end
wait(0.1)
emotelimit.Disabled = false
end)
So I need to change "workspace.Parent.EmoteFreeze" into "workspace.Aldovy.EmoteFreeze" with my name in it? I don't think that will work with other player in the server. please someone, help me :]
And here is the first localscript i made, located in the button
game.workspace:WaitForChild("Humanoid", 1)
local human = game.workspace.Aldovy.Humanoid
script.Parent.MouseButton1Click:Connect(function()
if human.AutoRotate == true then
human.AutoRotate = false
else
human.AutoRotate = true
end
if human.WalkSpeed == 10 then
human.WalkSpeed = 0
else
human.WalkSpeed = 10
end
if human.JumpPower == 20 then
human.JumpPower = 0
else
human.JumpPower = 20
end
wait(3)
human.AutoRotate = true
human.WalkSpeed = 10
human.JumpPower = 20
end)

4 comments
why not just do what the "EmoteFreeze" script is doing inside of the buttons script? i feel like you're over complicating a simple task.
I already did that, same output
I'm sorry, not exactly the same output. It tells me "Humanoid is not a valid member of DataModel"
Update: Posted the localscript inside the button