:For some reason, this basic remote function script isn't working and I'm not quite sure why. Anything wrong with my scripts?
:Function Script:
script.ClickButton.OnServerInvoke = function() print('Its Working!') end
:Call Function Script:
a = 1 for i=1, 5 do print(a) a = a + 1 wait(1) end script.Parent.ButtonScript.ClickButton:InvokeClient()
:Error Code:
08:50:56.079 - Argument 1 missing or nil 08:50:56.080 - Stack Begin 08:50:56.080 - Script 'Workspace.NoteTrack.Buttons.ButtonA.Script', Line 7 08:50:56.081 - Stack End
InvokeClient
requires one argument, a player object. I'm not entirely sure what you're doing over there, but I believe you meant OnClientInvoke
in the function script. If you are not communicating between a ServerScript and a LocalScript, you could simply use a BindableFunction