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

How do I make this LocalScript work as a Script?

Asked by 8 years ago
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
    player.TeamColor = BrickColor.new("Br. yellowish orange")
    script.Parent.Parent.Visible = false
    player:LoadCharacter()
end)

LoadCharacter doesn't work as a LocalScript in the actual game, so I made it a script instead. Transferring over the raw code doesn't work because of the GUI, though, so I'm curious of what I need to do to get it to work as a script. I'm running it inside of StarterGUI.

1 answer

Log in to vote
1
Answered by 8 years ago

You would have to use Remote Events to send the information to the server from the client. The thing about local scripts is that it's all client based. Anything done on a local script only appears on that players client. Here's a link for more information on the subject.

Ad

Answer this question