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

Basic script inside Gui stopped working?

Asked by 5 years ago
Edited 5 years ago

So I have this code:

script.Parent.MouseButton1Click:Connect(function()
    print("Clicked")
end)

but when I click that button no output no nothing. why is this happening this has always worked for me

edit: this isn't a local script but its always worked in a regular script so idk

0
two letters: F.E. theking48989987 2147 — 5y

2 answers

Log in to vote
1
Answered by 5 years ago

Put that script inside a local script. Thats the only way it will work these days. If you want a server event to happen, use remote events.

Ad
Log in to vote
0
Answered by 5 years ago

I moved everything to my local script and added what I actually want the button to do in:

local player = script.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
    print("Clicked")
    player.skinValue.Value = "cowboy"
    player.Character.Head:Remove()
end)

it looks like its doing everything and killing the player but my skin manager doesn't change the skin for some reason

0
nvm i got it on my own hamburger621 34 — 5y

Answer this question