local debounce = true
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
if debounce == true then
print('okay')
humanoid.WalkSpeed = 0
humanoid.JumpPower = 0
local torso = hit.Parent.LowerTorso
torso.CFrame = script.Parent.CFrame * CFrame.new(0,0,0)
local weld = Instance.new("Weld")
weld.Part0 = script.Parent
weld.C0 = script.Parent.CFrame:Inverse()
weld.Part1 = torso
weld.C1 = torso.CFrame:Inverse()
weld.Parent = script.Parent
script.Parent.Anchored = false
--[==[ This is weld
this comment is helping separate the two, okay.
--]==]
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://3267377176"
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack.Looped = true
animationTrack:Play()
debounce = false
end
end
end)
script.Parent.TouchEnded:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
debounce = true
end
end)
The animation is basically just to lay you down in a tube, I've used the looped property but isn't working. Any help is appreciated.

1 comment
(Edited since I didn't know how to highlight syntax.