ROBLOXCRITICAL - client crashes
Hi, I’m having some trouble with a place. Invokeing from the client (RemoteFunction) is crashing the client.
I am creating some FE Supported guns, and ran into a problem with a RemoteFunction. The error I am getting in a local server (client sided) is “ContextActionService::InvokeCallback failed because Callbacks cannot yield”, the code runs just fine however. When I try this in online mode, the client instantly crashes.
I have a RemoteFunction in ReplicatedStorage and a Client Sided script inside the gun, the client script Invokes the Server with the gunmodel as argument. A serversided script then checks if a spotlight is enabled/disabled and disables/enables it.
This has not happened to me before, as I am newly developing this. Happens 100% of the time.
Place can be found here http://www.roblox.com/Definitely-not-a-fort-place?id=112113581
EDIT: Interestingly enough, this does not happen when called from the command line in a local test environment. Perhaps the error happens because I am using ContextActionService?
EDIT2: This is definitely caused by using ContextActionService, spawning a new thread prevents this from happening. Can anyone tell me why this behaviour appears?