--I used the solution from 6 Years ago. But it seems not to work anymore. Please help --The part where it meant to take the player to the map. choosemap:Destroy() for _,plr in pairs(game.Players:GetChildren()) do if plr.Backpack:FindFirstChild("Sword") then plr.Backpack.Sword:Destroy() if plr.Backpack:FindFirstChild("Handgun") then plr.Backpack.Handgun:Destroy() for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(Vector3.new(game.Workspace.Spawns)) end end end end end
There should be an end after line 08. Because in your script, it seems you used two if's without ending the first one.
--I used the solution from 6 Years ago. But it seems not to work anymore. Please help --The part where it meant to take the player to the map. choosemap:Destroy() for _,plr in pairs(game.Players:GetChildren()) do if plr.Backpack:FindFirstChild("Sword") then plr.Backpack.Sword:Destroy() end -- here! if plr.Backpack:FindFirstChild("Handgun") then plr.Backpack.Handgun:Destroy() for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(Vector3.new(game.Workspace.Spawns)) end end end end end
Put a part and name it Tele2:
function onTouch(part) if part.Parent.Humanoid ~=nil then part.Parent:MoveTo(script.Parent.Parent.Tele1.Position) script.Parent.Parent.Tele1.Script.Disabled = true wait(2) script.Parent.Parent.Tele1.Script.Disabled = false end end script.Parent.Touched:connect(onTouch)
then create another and name it Tele1:
function onTouch(part) if part.Parent.Humanoid ~=nil then part.Parent:MoveTo(script.Parent.Parent.Tele2.Position) script.Parent.Parent.Tele2.Script.Disabled = true wait(2) script.Parent.Parent.Tele2.Script.Disabled = false end end script.Parent.Touched:connect(onTouch)
add your giver scripts and why is there a beginning indent
choosemap:Destroy() for _,plr in pairs(game.Players:GetChildren()) do