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

How do I make this LocalScript work as a Script?

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

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.

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