The wiki makes it clear you can do this, but doesn't really explain how. I want to send three variables through a remote event. The player, an integer, and a Boolean. How exactly would I do this?

Is this the right formatting in the client? Do I have to format it any differently in the server?

--Client
playAnimationEvent:FireServer(player, fireID, true)

--Server
local function onPlayAnim(player,animId,stopPrevious)
	--do the stuff
end

playAnimationEvent.OnServerEvent:Connect(onPlayAnim)

Obviously I'm cutting out the beginning setup.

3 comments

0

You do not need to define player, assuming that that is the player it is coming from. It is already defined in the :FireServer automatically.

0

Alright, thank you. Do I still need to have player in the parentheses after the onPlayAnim function?

0

You're using RemoteEvents to play animations? LocalScripts automatically replicate the animations to the other player clients, I believe.