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: I can't fix this team-change script

Previous Thread :: Next Thread 
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
26 Mar 2013 04:18 PM
The script is in a TextButton, inside a frame, inside a frame, inside a ScreenGui. For some reason, it doesn't work. I can't find any errors, so please help!

function click()
local t = game.Teams[script.Parent.Text]
local player = game.Workspace:FindFirstChild(script.Parent.Parent.Parent.Parent.Parent.Parent.Name)
if player.Torso.roblox.Texture == "http://www.roblox.com/asset/?id=65112455" then
script.Parent.Parent.Parent.Parent.Parent.Parent.TeamColor = t.TeamColor
local spawns = game.Workspace.SpawnLocations:GetChildren()
for i=1, #spawns do
if spawns[i].TeamColor == t.TeamColor then
script.Parent.Parent.Parent.Parent.Parent.Parent.Character:MoveTo(spawns[i].Position + Vector3.new(0,10,0))
end
end
end
script.Parent.Parent.Parent:Remove()
end
script.Parent.MouseButton1Click:connect(click)
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
26 Mar 2013 05:14 PM
it's
script.Parent.MouseButton1Down:connect(click)

Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
26 Mar 2013 05:15 PM
Inside a frame > Inside a frame > Inside a screenGUI
Why two frames?
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
26 Mar 2013 05:17 PM
Nothing wrong with 2 frames :P
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
26 Mar 2013 05:18 PM
Just cuz. It's easier to work with.

@2 above
You can do it like that too. It works just as well.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
26 Mar 2013 05:18 PM
@Master
I wasn't saying he was wrong, I really want to know what it is for.
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
26 Mar 2013 05:29 PM
This isn't helping.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
26 Mar 2013 05:31 PM
Sorry, I'll go try and fix it.
No promises, I'm not that good.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
26 Mar 2013 05:40 PM
One thing I found wrong is you can not see a textbutton when it is in a frame in a frame in a screen gui
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
26 Mar 2013 05:41 PM
Yes u can
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
26 Mar 2013 05:48 PM
I tried it, I could not see it.
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
26 Mar 2013 06:01 PM
I'd give you the actual GUI, but the game it's in has a lot of visits.

~ican't think of a good siggy~
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