I'm pretty new to programming in lua and I just wanted to make a simple freeze tag game while while I improve at using lua. I've made a script which freezes the players character when they touch the grey part by anchoring the body parts and I've made it so that the ice block spawns on the humanoid at the same time. The issue is, on the client's side, the character isn't fully in the ice block, unlike on the server. I want the client to look how the server looks and I'm not sure how to do it. I've attached 2 screenshots just to show what it looks like. Any help would be appreciated.
#Client not in sync with server
1 messages · Page 1 of 1 (latest)
put the scriptz
brick.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Parent:FindFirstChild("Head").Anchored = true
humanoid.Parent:FindFirstChild("Torso").Anchored = true
humanoid.Parent:FindFirstChild("Left Arm").Anchored = true
humanoid.Parent:FindFirstChild("Left Leg").Anchored = true
humanoid.Parent:FindFirstChild("Right Arm").Anchored = true
humanoid.Parent:FindFirstChild("Right Leg").Anchored = true
local ice = game.ServerStorage.Ice:Clone()
ice.Parent = humanoid.Parent
ice.Rotation = humanoid.Parent:FindFirstChild("Torso").Rotation
ice.Position = humanoid.Parent:FindFirstChild("Torso").Position
end
end)```
this is the script inside the grey part
yeahhh i dont see why it isnt
its really annoying
i cant find anything on the dev forum to fix it either
btw
cant u make a loop that detects all the parts an anchors them
instead of selecting everyone
oh yeah i could
In computers, lag is delay (latency) between the action of the user (input) and the reaction of the server supporting the task, which has to be sent back to the client.
The player's ability to tolerate lag depends on the type of game being played. For instance, a strategy game or a turn-based game with a slow pace may have a high threshold or ev...
thought it might be lag but other freeze tag games dont have the same issue
u can do it with IsA("Part") i think
so im not sure what theyre doing differently
how can it be caused by lag though
a simple solution in your particular case may be to create the iceblock then weld it to the player's humanoidrootpart (unanchored) on the server and then freeze the character on the client
thank you, i will try that
gg
I'm very familiar with this problem and what it looks like
ooooooh
yea that solution means the iceblock will move a bit for other players because of lag but it should function good enough that no one will really notice or care
inb4 iceblock.touched lag 
nice, how long have you been scripting?
too long