Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I have a color change GUI but its only running client side?

local playerRunningForLocalScript = game.Players.LocalPlayer
local playersCharacter = playerRunningForLocalScript.Character or playerRunningForLocalScript.CharacterAdded:wait()
local playersTorso = playersCharacter:WaitForChild('Torso')

local mainGui = script.Parent

function changePlayersTorsoColorOnClick()
    playersTorso.BrickColor = BrickColor.new("Really red")  
end

mainGui.MouseButton1Click:connect(changePlayersTorsoColorOnClick)

here is my explorer: https://gyazo.com/d93d4a87615857d940d60398c6093e63

So my GUI and script work great but when it changes your color it is only on the client so no one else can see it. I am guessing this is because I have filtering enabled on so I researched it and it told me to look at remote events. I did that but that doesn't help me because that only is used to have local scripts fire servers scripts. I really don't know what to do... any suggestions or tips?

1 answer

✓ Accepted answer

RemoteEvents will be handy in this case, considering you want their appearance to change for everyone. Essentially, you're going to fire an event that the server will receive, and it'll handle it appropriately by changing a person's character to the color of their choosing.

Be sure to check out the tutorial on Remote Events.

2 comments

0

How would I get the players character?

0

Check out the tutorial, it'll show how to get the player.

This discussion is preserved as it was. New answers, comments, and votes are closed.