I have a module function that once called, will take the fake character of player1 (made when characterAdded which is connected to playerAdded) and weld it to player2.
the function would set the Welded/Carried value inside the player’s model to true.
I have a LocalScript that has a Changed connection with the Welded/Carried value.
When it is fired, it looks in workspace.carried (where all fake characters are parented to) and uses :WaitForChild(player.Name) to find their own character. (I’ve tried using :FindFirstChild() at first but it just returned as nil)
It then changes the CameraSubject of workspace.CurrentCamera to the fake character.
–error time!!
the script infinitely yields when WaitForChild() is called even when instance is there.
Or maybe the instance doesn’t exist for the client (or smth idk)
–Line 184-186 (infinite yield line)
elseif state.Value == "Carried" then
workspace.CurrentCamera.CameraSubject = workspace["carried"]:WaitForChild(player.Name)
end
images are taken on client side
TL;DR - the script is yielding infinitely even when instance exists (i think)
It will probably not resolve your issue, but :WaitForChild takes a number as a parameter which acts as a time-out for the yield.
It’s good practise to always add this.
Is the module’s function being fired on the server? Calling the carry function on just one client will only replicate those changes to the client that fired the function.
If the function is being called on the server, then I’m not really sure what the issue is at the moment without seeing any further samples of your code (any suspects that might have caused the issue)