generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Displaying gui

Previous Thread :: Next Thread 
jjwood1600 is online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
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
SpeedyJZoel is not online. SpeedyJZoel
Joined: 16 Aug 2010
Total Posts: 2416
26 Nov 2015 07:37 AM
You don't need the instance.new when u clone something
Report Abuse
jjwood1600 is online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
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
alphaboy299 is not online. alphaboy299
Joined: 15 Jun 2013
Total Posts: 1496
26 Nov 2015 08:52 AM
Items don't clone from serverstorage in studio play mode.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image