#How would approach proper replication of a climbing system to the Server

1 messages · Page 1 of 1 (latest)

verbal saddle
#

I’m working on a simple climbing system for a game I’m making. It basically uses a Weld instance (built into the StarterCharacter) to force the player onto a climbing grip when in range. The problem is, when I change the Weld’s Part1 on the client it’s not replicating to the server.

Here is a video of the client and server pov when testing: https://youtu.be/dbQfjnDIrr4

One solution I tried was using a RemoteEvent that the client would fire to set the Weld’s Part1 on the server, and it worked pretty well until I tested it with Incoming Replication Lag set to 1. With this solution, the player’s character would jump back and forth to different climbing grips they previously grabbed when the server would recieve the event.
(unfortunately i didnt record this solution and im too lazy to bring it back and re-test it)

ocean patio
#

I think a body mover would be better in this case

#

Are you using magnitude or raycast?

verbal saddle
verbal saddle
ocean patio
#

Oh okay

#

Have you tried printing

#

The network ownership

#

Of the weld

#

If it’s not the player character

verbal saddle
#

you can only set network ownership of BaseParts iirc

verbal saddle
ocean patio
#

If the weld already exist on startup then what are you doing when the player stops holding

#

Just turning enabled off?

verbal saddle
#

When the player stops grabbing a hold the Part1 is set to nil

vale prawn
#

show code

pearl quiver
# verbal saddle you can only set network ownership of BaseParts iirc

if you weld the character to an anchored part, the player will lose network ownership of their character. i think use alignposition (to a client-only attachment or part in the position you want, not to the wall directly) and if you want the snapping then simply teleport the character by setting cframe.

verbal saddle
#

i found a solution:
basically i just use a bodyvelocity to lock the character's velocity to zero to keep them from moving (sort of like anchoring but not actually anchoring) and then i just move the character to the hold continuously