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

can i use 1 remote event to do 2 things?

i was wondering if i could use 1 remote event for 2 things so in 1 serverscript it would wait 5 seconds then change the baseplate colour to red and in 2nd it would wait 10 second and then it would change it to black. will that work or will it break or something?

i know i could probably add in a cmnd like

game.Workspace.Event.OnServerEvent:Connect(function(player, Cmnd)
	if Cmnd == "Red" then
	game.Workspace.Baseplate.BrickColor = BrickColor.New("Bright Red")
	elseif Cmnd == "Black" then
	game.Workspace.Baseplate.BrickColor = BrickColor.New("Black")
end)

i dont want to do it that way ^^

1 answer

✓ Accepted answer

In your case, yes. Instead of doing that, just send the BrickColor you want the baseplate to be like so:

game.Workspace.Event.OnServerEvent:Connect(function(player, colour)
    game.Workspace.Baseplate.BrickColor = colour
end)

Then from a localscript:

game.Workspace.Event:FireServer(BrickColor.new("Really red"))

2 comments

0

I also suggest you do checks to make sure you are getting correct information. An exploiter could send a Vector3 value and break your script.

0

ty

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