So, I have a GUI for a timer for the Ninja Warrior game I'm making right now. Here's the script:
part = script.Parent
Time = script.Parent.Time
Gui = game.StarterGui.ScreenGui.TextLabel
bool = true
function onTouched()
if bool == false then return end
bool = false
if part:FindFirstChild("Humanoid") ~= nil then
Time.Value = 90
Gui.Text = "90"
for i = 1,90 do
Time.Value = Time.Value - 1
Gui.Text = Time.Value
wait(1)
if Time.Value == 0 or if workspace["Stage 1"].Water:FindFirstChild("Humanoid") ~= nil then
Gui.Text = "Failure!"
part.Parent.Torso:BreakJoints()
wait(8)
Gui.Text = "90"
if workspace["Stage 1"].Clear:FindFirstChild("Humanoid") ~= nil then
if Time.Value > 0 then
Gui.Text = "Clear!"
part.Parent.Torso:BreakJoints()
wait(10)
Gui.Text = "90"
end
end
end
end
wait(10)
bool = true
end
My main question is that how do I make it teleport to a certain place without killing the Humanoid of the Player? Would I use "spawn"?
