Making fighting game.
Trying to implement hitstun mechanic, but because of roblox’s client-server replications 0.15 becomes 1 second and teleports player far away.
any advices?
hum:GetAttributeChangedSignal("Stunned"):Connect(function()
if Statuses.Stunned == false then return end
coroutine.wrap(function()
char.PrimaryPart:SetNetworkOwner(nil)
for i,v in pairs(char:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = true
end
end
task.wait(0.15)
Statuses.Stunned = false
for i,v in pairs(char:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = false
end
end
char.PrimaryPart:SetNetworkOwner(realPlr)
end)()
end)