The TextButton is supposed to teleport a player to one of five positions, remove the TextButton so they can't TP away if they're about to die, FF them for 5 seconds, and then give them a tool "EnergySword" which is located in lighting. Everything works except for giving the tool part
wait() math.randomseed(tick())
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
player.Character:MoveTo(workspace['spawn'..math.random(5)].Position)
script.Parent.Visible = false
local f = Instance.new('ForceField',player.Character)
coroutine.wrap(function() wait(5) f:Remove() end)()
end)
script.Parent.MouseButton1Click:connect(function(player)
local EnergySword = game.Lighting.EnergySword:Clone()
game.Lighting["EnergySword"]:clone().Parent = player:FindFirstChild("Backpack")
end)
