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

Help with Firing a remote event and getting Argument 1 missing?

Asked by 4 years ago

local BrickEvent = game.ReplicatedStorage.Events.Gui local click = script.Parent

click.MouseClick:Connect(function(click) BrickEvent:FireClient() end) that's the code I use to fire the even and it says the BrickEvent:FireClient() line has a missing argument 1 or nil

1 answer

Log in to vote
0
Answered by 4 years ago

When using remote events to fire the client via the server, a player object must be passed in the first argument so the server knows which client to fire, otherwise the server has no idea what client you want to execute code on.

BrickEvent:FireClient(PlayerObject -- Argument 1)

More information can be found on the developer wiki, here

Ad

Answer this question