Hello, I made a script which will say the name of the model in a remote event which will then be taken care of by this script. I took “func”, this represents the name of the model (the message said by the server). Why does it show me “unable to cast value to object”?
ok so, the First thing I notice is that you don’t have a Player Instance
Unlike FireServer, FireClient with the exception of FireAllClients requires a Player so the Event knows who to fire to, remove the Player event from the OnClientEvent as it is not already specified.
You’ll Need to specify that Argument with FireClient
function onTriggered(Player)
event:FireClient(Player, "TurnstilesV1")
end
Use FireAllClients if you intend to Fire for all Players
For future references, don’t post images of your code (its against the guidlines for this section).
Instead, paste your code and put ``` on each side of your code.
Example:
Heres what I did:
--Here's what it turns it into:
print("Hello World")