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

Why wont the GUI button script won't work?

Asked by 9 years ago
local Button = script.Parent
Frame = script.Parent.Parent.gggg


function onClick() 
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(-0,1,43)
wait()
    game.Players.LocalPlayer.Character.Torso.Anchored=true

    wait()

Frame.Visible = false

end 

Button.MouseButton1Click:connect(onClick)
0
Anything in the output? Everything seems fine. Perhaps you're using a server script instead of a local script. Redbullusa 1580 — 9y
0
No, there's nothing in the output. SprocketSoldier 0 — 9y
0
Yeah it's a server script..is that the problem..?! SprocketSoldier 0 — 9y
0
Yes, because you can not use 'LocalPlayer' within a 'Server-Sided' script, 'LocalPlayer' is 'ClientSided' only. TheeDeathCaster 2368 — 9y
View all comments (2 more)
0
........Thank you. I've been trying to solve this problem for a few days now. SprocketSoldier 0 — 9y
0
Actually no...it's still not working. I've put it into a local script SprocketSoldier 0 — 9y

Answer this question