Hello! Im making it so that whenevr you step on a part, you teleport onto the part, and can’t move.
I’ve got the not moving part down, however, whenever I try and step on it, this weird thing happens.
I don’t know why this is happening. Can someone please tell me how to fix it?
Thank you.
local playerin = false
local roundgoingon = false
script.Parent.Parent.Parent:FindFirstChild("Player1Touch").Touched:Connect(function(part)
print('hi')
if part.Parent:FindFirstChild("Humanoid") and playerin == false and roundgoingon == false then
print('hello')
playerin = true
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
local char = plr.Character or plr.CharacterAdded:Wait()
local hrp = char:FindFirstChild("HumanoidRootPart")
hrp.CFrame = part.CFrame + Vector3.new(0, 2, 0)
game.ReplicatedStorage.BoxingPlayers:FireClient(plr)
print('worked?')
end
end)
game.ReplicatedStorage.BoxingPlayers.OnServerEvent:Connect(function(plr, ring3, start)
if playerin and roundgoingon == false then
playerin = false
end
end)