OnClientEvent not working

Yup, the OnServerEvent connection works perfectly.

As well as on the Client side of things, you might find issues with your change() function’s if statement, as there’s no alternative (add an else and print “No class found!”) for debugging/information. And passing the class Instance on that, may also be an issue.

1 Like

Well, the change function works perfectly, as when I type the name of an existing character, My avatar changes into said character. The only thing that doesn’t change is the camera, which is what the OnClientEvent connection is supposed to handle.

Could you place the print before trying to do the camera stuff?

The “a” still doesn’t display on the output.

Can you try wrapping your FireClient call within a task.defercall?

task.defer(function()
  event:FireClient(plr, clone)
end)

Wrapping it with a task.defer still doesn’t work.

Unless for some odd reason your script is being deleted, I’m not entirely certain as to how this would fail to work at this point.

You might try setting ResetOnSpawn to false on your Gui.

1 Like

That might work because you are setting the character which causes the script inside starter GUI to refresh

Surprisingly, setting ResetOnSpawn to false worked. Thanks dude!

Figured, it’s usually fairly simple issues.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.