Server Script: (the one where it stops at line 7)
game.ReplicatedStorage.IceFire.OnServerEvent:Connect(function(plr)
local icering = game.ReplicatedStorage.IceRing:Clone()
icering:SetPrimaryPartCFrame(plr.Character.HumanoidRootPart.CFrame) -- teleporting the icering to the player
icering.Parent = workspace
plr.Character.HumanoidRootPart.CFrame = icering.PlayerTp.CFrame -- teleporting the player above the icering
print("Continuing")
wait(0.1)
plr.Character.LowerTorso.Anchored = true -- anchoring the player so they dont fall
wait(1)
icering.Sound.Playing = true -- explosion sound
local Info = TweenInfo.new(3,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out,0,false,0)
local Goals = {Size=Vector3.new(50,50,50)}-- the size to tween to
for i, v in pairs(workspace.IceRing:GetDescendants()) do
if v:IsA("BasePart") then
v.Touched:Connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") then
if not plr then
touch.Parent.Humanoid.Health -= 100
end
end
end)
local tween = game:GetService("TweenService"):Create(v,Info,Goals)
tween:Play()
tween.Completed:Connect(function()
plr.Character.LowerTorso.Anchored = false
icering:Destroy()
end)
end
end
end)
Local Script: (Fires a remote to the server when a player presses "E")
local inputservice = game:GetService("UserInputService")
local debounce = false
inputservice.InputBegan:Connect(function(input, isTyping)
if not debounce then
if input.KeyCode == Enum.KeyCode.E then
debounce = true
game.ReplicatedStorage.IceFire:FireServer()
wait(6)
debounce = false
end
end
end)

1 comment
It tps the player above the ice then stops continuing the script