Hello. The player keeps falling out of the map and I tried the last 2 solutions on the last But didn't So can someone please help.
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() end -- here! for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(Vector3.new(game.Workspace.Spawns)) end end end end
Howdy!
You need to specify that you want your player to go to the Vector3 of the brick called "Spawns". To do this, just get the property of it. Check out what I have below. It should work if there is a brick in the workspace called "Spawns". Also, I recommend you set that brick to be non-collide so that players aren't being shoved into bricks. (Although that does sound like fun.) ????????
choosemap:Destroy() for _,plr in pairs(game.Players:GetChildren()) do if plr.Backpack:FindFirstChild("Sword") then -- If the player has a sword, let's get rid of that and their gun. plr.Backpack.Sword:Destroy() if plr.Backpack:FindFirstChild("Handgun") then plr.Backpack.Handgun:Destroy() end -- here! end for i,v in pairs(game.Players:GetPlayers()) do -- Time to send them all to the spawn point. v.Character:MoveTo(game.Workspace.Spawns.Position) end end end
maybe try to take away the then in plr.Backpack.Handgun:Destroy()
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") -- right here take away this and try it plr.Backpack.Handgun:Destroy() end -- here! for i,v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(Vector3.new(game.Workspace.Spawns)) end end end end
Like this??
Thanks aswell.
choosemap:Destroy() for _,plr in pairs(game.Players:GetChildren()) do if plr.Backpack:FindFirstChild("Sword") then -- If the player has a sword, let's get rid of that and their gun. plr.Backpack.Sword:Destroy() if plr.Backpack:FindFirstChild("Handgun") then plr.Backpack.Handgun:Destroy() end -- here! end for i,v in pairs(game.Players:GetPlayers(1)) do -- Time to send them all to the spawn point. v.Character:MoveTo(game.Workspace.Spawns.Position) end end end