What do you want to achieve? Keep it simple and clear!
I am trying to anchor a person when they are seen by others.
What is the issue? Include screenshots / videos if possible!
If they get anchored while they are running, their position may show differently than on the server for everyone else probably because of server delay or something.
Here is an example
Client on left- Everyone’s View
Client on right- Frozen player’s view
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
My only solution is, fire an event sending them their server position and setting all their body part positions to the requested positions.
This however isn’t 100% perfect as there’s still a TINY noticeable delay, and it also comes with the annoyance of the client that’s being anchored to be visibly teleported because of this.
-- THIS IS ON SERVER SCRIPT
for i, Part in ipairs(WA:GetChildren()) do
if Part:IsA("BasePart") then
Part.Anchored = true
end
end
To stop this, I think you should anchor them from their client. If you’re going to put ice on them to appear to make them frozen for example, just fire the event to the client to anchor them then task.wait so their movements stopped, then weld the ice to them.
This makes the delay better but is still not perfect unfortunately and it also doesn’t anchor them on the server which isn’t what I want, if you have any other solutions please say.
Okay so here is the best solution I got that I’ll stick with. I decided that when the player gets frozen, an event will be fired to the server to change the server’s position to the client’s position. This is the best solution so far that I have, it’s a bit exploitable because exploiters can use this event to teleport their player but with some sanity checks and security it should be fine.