#Rotating Killbrick not working

18 messages · Page 1 of 1 (latest)

kindred crystal
#

The killbrick uses a hinge to rotate. It teleports players when they are in it's radius even though they have not touched the part. I do not know what is causing this, please help.

local defSpawn = game.Workspace:WaitForChild("SpawnLocationDef")
local position = defSpawn.Position

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local hrp = hit.Parent:WaitForChild("HumanoidRootPart")
        hrp.Position = position
    end
end)
glass comet
#

Roblox physics is buggy. Consider anchoring the part and rotating it from script by changing its CFrame I think it's the best solution.

kindred crystal
glass comet
#

If you have a lot of rotating parts - yes

#

In that case you can try to implement all rotating parts on client. Put invisible parts in places where you want a rotating part, then make a local script that adds a part to every one of that invisible points and starts rotating them.

#

I've never done that before tho so I'm not sure

kindred crystal
kindred crystal
thick lichen
#

😭

kindred crystal
#

CFrame and Tweens are hella laggy

#

I think finding a solution to this would be revolutionary

thick lichen
kindred crystal
#

But the actual problem, was because of latency, because I was handling the killbrick script from the server side, it seemed as if the player did not touch the part at all