Hello Developers,
So I’m trying to add a ragdoll system to my hitbox but it keeps coming up with this warning when I press keybind E. Please help me!
ScreenShot:
Hello Developers,
So I’m trying to add a ragdoll system to my hitbox but it keeps coming up with this warning when I press keybind E. Please help me!
ScreenShot:
You can’t access serverscriptservice from a local script, therefore Ragdoll will never exist in serverscriptservice from the clients perspective.
WaitForChild
yields the thread in order to find the instance. If the instance never gets added, it could cause a infinite yield, which could prevent your code from running at all. So the issue here is that the instance you’re looking for is not being added. And with this in mind, read the cause (given by steven)
So I have to change the script from a client to a server script?
Well, if you need to do something this from the client, just put ragdoll somewhere the client can access it, like replicatedstorage.
No. Your script was intended to function on the client. Instead, you should store whatever this instance is in ReplicatedStorage, which has the main purpose of allowing access by the server and the client.