I am trying to make a lava witch goes up but once you die the lava stops rising and goes to the begining but i found a problem that once you die the lava dosent stop going up here is the script
local tweenservice = game:GetService("TweenService")
local lava = game.Workspace.Downs
local deb = false
script.Parent.Touched:Connect(function()
deb = true
local Properties = {
Position = Vector3.new(-541, 31.75, -2.4)} -- location were it goes
local TweenInfoo = TweenInfo.new(30,Enum.EasingStyle.Sine,Enum.EasingDirection.In)
local tween = tweenservice:Create(lava,TweenInfoo,Properties)
wait(2)
tween:Play()
wait(5)
deb = false
end)
game.Players.PlayerAdded:connect(function(plr) -- script that detects once player dies
plr.CharacterAdded:connect(function(chr)
chr:WaitForChild("Humanoid").Died:connect(function()
lava.Position = Vector3.new(-541, -40.65, -2.4) -- sets lava to begining
end)
end)
end)
