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 » Scripting Helpers
Home Search
 

Re: LocalScript in GUI Help?

Previous Thread :: Next Thread 
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
11 Jul 2014 02:43 AM
I kind of alternated it...

I made a local script and placed it into a StarterGui. and it seems not to be working qq



part = game.Workspace.SpecialPart

function touch(part)
if (part.Parent:FindFirstChild("Humanoid")) and game.Players:FindFirstChild(part.Parent.Name) then wait(0.05)
if game.Players:FindFirstChild(part.Parent.Name).TeamColor == game.Teams["Inmates"].TeamColor then
for _,v in pairs(game.Players:GetPlayers()) do
if v.TeamColor == BrickColor.new("Bright blue") then
local msg = script.Parent.Frame.TextLabel3
msg.Parent = v.PlayerGui
wait(0.5)
msg.Visble = false
wait(0.5)
msg.Visible = true
wait(0.5)
msg.Visible = false
wait(0.5)
msg.Visible = true
wait(0.5)
msg.Visible = false
wait(0.5)
msg.Visible = true
wait(0.5)
msg.Visible = false
wait(0.5)
msg.Visible = true
wait(0.5)
msg.Visible = false
wait(0.5)
end
end
end
end
end

script.Parent.Touched:connect(touch)

You just got Quarter-Term'd
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jul 2014 02:49 AM
script.Parent.Touched in StarterGui? I think not.
Report Abuse
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
11 Jul 2014 02:53 AM
How would I edit this?

Part in workspace, when a person touches it. The Gui will do that Visible and Invisible thing.

You just got Quarter-Term'd
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jul 2014 02:55 AM
Put it back in the part in a normal script and tell me the output.
Report Abuse
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
11 Jul 2014 02:59 AM
Nothing in output when I tested it.

You just got Quarter-Term'd
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jul 2014 03:01 AM
The script looks fine.
Are you sure you're in the right team when testing?

And also, local msg = script.Parent.Frame.TextLabel3, needs to be cloned to the players' GUI, not parented or else it will break if tjeres more than 1 player.
Report Abuse
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
11 Jul 2014 03:04 AM
I kinda did something wrong.

local msg = game.StarterGui.Frame.TextLabel3

this is what was in the code when i tested it instead of:
local msg = game.StarterGui.Global.Frame.TextLabel3

I'm gonna test it now.

GUI is suppose to appear when you're on Correctional Officers Team (Bright blue) when a Prisoner (Bright orange) touches it.

You just got Quarter-Term'd
Report Abuse
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
11 Jul 2014 03:27 AM
Output:
TextLabel3 is not a valid member of 'Frame'

TextLabel3 is under frame though.

You just got Quarter-Term'd
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jul 2014 03:35 AM
Try a wait for child.
Report Abuse
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
11 Jul 2014 03:36 AM
how?

You just got Quarter-Term'd
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
11 Jul 2014 03:37 AM
Wait you want it to be in player GUI not starter GUI.
Report Abuse
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
11 Jul 2014 03:39 AM
So what do?

You just got Quarter-Term'd
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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