I'm making a script that when a player presses a button, a Frame with the same name will turn green. It hasn't worked. Here's what I tried:
script.Parent.MouseButton1Click:Connect(function(click)
script.Parent.Parent.PlayerStats[click].BackgroundColor3 = Color3.fromRGB(0, 255, 0)
game.ReplicatedStorage.Values.PlayersReady.Value = game.ReplicatedStorage.Values.PlayersReady.Value +1
script.Parent.Visible = false
end)
Please help! Thanks!
-JBennettChief9!

6 comments
Remarkable answer!
Sorry, that didn't work. Would it affect the script to know that it's not a LocalScript?
You should never be handling user input on the server! If you're using MouseButton1Click in a server script, you might want to change around how you're handling that.
A good way to do this is utilization of RemoteEvents and RemoteFunctions.
I don't know how to use RemoteEvents/RemoteFunctions :(
They're quite simple once you understand the basic principles of what they do and how they work. If you want to learn about how they, work I suggest taking a look at the Developer Hub.