1
\$\begingroup\$

I started to delve into the UNet system for the first time the other day and I've run into a bit of an issue while testing on a localhost server. In the scene there is a Rigidbody ball that I want every player to be able to pick up and move around. So on each player there is a script where every time they right click, a raycast is sent out, and if it hits the ball, then a [Command] is sent to run a method on the ball called RequestNewHandler(), what this does is check to see if the ball is currently being held by someone, and if not, it attaches itself to the player object that issued the [Command]. So far the script works very well... if you are the localhost. I can't seem to get any clients to be able to pick up the ball. The only thing I can think of is that it may have something to do with my NetworkPlayerInitialization() script, which is just a script that enables all of the required components for each local player that connects to the server, like the camera, movement scripts and this script. But I'm unsure of what I need to do to fix this issue. If anyone needs any clarifications just let me know, thanks.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.