Ad
Log in to vote
0

Why wont the GUI button script won't work?

Asked by 7 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 — 7y
0
No, there's nothing in the output. SprocketSoldier 0 — 7y
0
Yeah it's a server script..is that the problem..?! SprocketSoldier 0 — 7y
0
Yes, because you can not use 'LocalPlayer' within a 'Server-Sided' script, 'LocalPlayer' is 'ClientSided' only. TheeDeathCaster 2368 — 7y
View all comments (2 more)
0
........Thank you. I've been trying to solve this problem for a few days now. SprocketSoldier 0 — 7y
0
Actually no...it's still not working. I've put it into a local script SprocketSoldier 0 — 7y

Answer this question