|
| 06 Jan 2014 06:22 PM |
local mapDirectory = game.Lighting.Maps local msg = Instance.new("Message") msg.Parent = game.Lighting local maptime = 5
while true do wait(0.5) local maps = mapDirectory:getChildren() if #maps == 0 then print("Maps not found! Selfremoving...") script:remove() return end
if script.Parent.Water.Tsunamis.FirstWC.Position.Z > 1500 then local pickedMap = maps[math.random(1, #maps)] local pickedMapClone = pickedMap:clone() for number,player in pairs (game.Players:GetPlayers()) do local char = player.Character if char.Head.Position.Y < 434 and char.Humanoid.Health > 0 then local name = player.Name end end msg = Instance.new("Message") msg.Parent = game.Workspace msg.Text = "Survivors: " ..name.."." script.Parent.ScorePart.CanCollide = true wait(1.5) script.Parent.ScorePart.CanCollide = false wait(1.5) msg.Text = "Map is being changed!" wait(5) msg.Text = "Map chosen is: " ..pickedMapClone.Name.."." print("Map inserted: " .. pickedMap.Name) pickedMapClone.Parent = game.Workspace pickedMapClone:makeJoints() wait(5) msg.Text = "Good Luck!" wait(3) msg.Text = "Survival In Progress..." msg.Parent = game.Lighting wait(3) repeat wait(0.5) if script.Parent.Water.Tsunamis.FirstWC.Position.Z > 1500 then pickedMapClone:remove() end until script.Parent.Water.Tsunamis.FirstWC.Position.Z > 1500 end end
It works without the player stuff I just want it to work with the player stuff and the name variable Tell me whats wrong |
|
|
| Report Abuse |
|
| |