|
| 26 Nov 2015 07:17 AM |
Hi guys! Really confused as to why this is not displaying?! Any ideas? Thanks
function touch(part) Player = game.Players:FindFirstChild(part.Parent.Name) if Player and Player.TeamColor == BrickColor.new("Bright green") then Player.TeamColor = BrickColor.new("Bright red") Player:LoadCharacter() gui = Instance.new("ScreenGui") gui = game.ServerStorage.YouEscaped:Clone() gui.Name = "YouEscaped" gui.Parent = game.Players:FindFirstChild(part.Parent.Name).PlayerGui wait(2.5) gui:Destroy()
elseif Player and Player.TeamColor == BrickColor.new("Bright blue") then gui2 = Instance.new("ScreenGui") gui2.Name = "SecurityTryToEscaped" gui2 = game.ServerStorage.SecurityEscaped:Clone() gui2.Parent = game.Players:FindFirstChild(part.Parent.Name).PlayerGui.SecurityTryToEscaped wait(3) gui2:Destroy() end end
script.Parent.Touched:connect(touch) |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2015 07:37 AM |
| You don't need the instance.new when u clone something |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2015 07:51 AM |
*facepalm* Oh yeah - thanks! Although it still doesn't work..
function touch(part) Player = game.Players:FindFirstChild(part.Parent.Name) if Player and Player.TeamColor == BrickColor.new("Bright green") then Player.TeamColor = BrickColor.new("Bright red") Player:LoadCharacter() gui = game.ServerStorage.YouEscaped:Clone() gui.Name = "YouEscaped" gui.Parent = game.Players:FindFirstChild(part.Parent.Name).PlayerGui wait(2.5) gui:Destroy()
elseif Player and Player.TeamColor == BrickColor.new("Bright blue") then gui2 = game.ServerStorage.SecurityEscaped:Clone() gui2.Parent = game.Players:FindFirstChild(part.Parent.Name).PlayerGui.SecurityTryToEscaped wait(2.5) gui2:Destroy() end end
script.Parent.Touched:connect(touch) |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2015 08:52 AM |
| Items don't clone from serverstorage in studio play mode. |
|
|
| Report Abuse |
|
|