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: What's wrong with this script (I think it's the ends)

Previous Thread :: Next Thread 
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 07:25 AM

Bar = game.StarterGui.Bar
Outside = game.StarterGui.Outside
model = script.Parent.Parent.Model

if model.Name = "Hacking The System... 1%" then
Bar.Frame.Visible = true
Outside.Frame.Visible = true
end
if model.Name = "Hacking The System... 10%" then
Bar.Frame.Size = {0, 20}, {0, 10}
Bar.Frame.Position = {0, 14}, {0, 530}
end
if model.Name = "Hacking The System... 20%" then
Bar.Frame.Size = {0, 20}, {0, 20}
Bar.Frame.Position = {0, 14}, {0, 520}
end
if model.Name = "Hacking The System... 30%" then
Bar.Frame.Size = {0, 20}, {0, 30}
Bar.Frame.Position = {0, 14}, {0, 510}
end
if model.Name = "Hacking The System... 40%" then
Bar.Frame.Size = {0, 20}, {0, 40}
Bar.Frame.Position = {0, 14}, {0, 500}
end
if model.Name = "Hacking The System... 50%" then
Bar.Frame.Size = {0, 20}, {0, 50}
Bar.Frame.Position = {0, 14}, {0, 490}
end
if model.Name = "Hacking The System... 60%" then
Bar.Frame.Size = {0, 20}, {0, 60}
Bar.Frame.Position = {0, 14}, {0, 480}
end
if model.Name = "Hacking The System... 70%" then
Bar.Frame.Size = {0, 20}, {0, 70}
Bar.Frame.Position = {0, 14}, {0, 470}
end
if model.Name = "Hacking The System... 80%" then
Bar.Frame.Size = {0, 20}, {0, 80}
Bar.Frame.Position = {0, 14}, {0, 460}
end
if model.Name = "Hacking The System... 90%" then
Bar.Frame.Size = {0, 20}, {0, 90}
Bar.Frame.Position = {0, 14}, {0, 450}
end
if model.Name = "Hacking The System... 100%" then
Bar.Frame.Size = {0, 20}, {0, 100}
Bar.Frame.Position = {0, 14}, {0, 440} then
Bar.Frame.Visible = false
Outside.Frame.Visible = false

end
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
30 Dec 2011 07:31 AM
Bar = game.StarterGui.Bar
Outside = game.StarterGui.Outside
model = script.Parent.Parent.Model

if model.Name = "Hacking The System... 1%" then
Bar.Frame.Visible = true
Outside.Frame.Visible = true
if model.Name = "Hacking The System... 10%" then
Bar.Frame.Size = {0, 20}, {0, 10}
Bar.Frame.Position = {0, 14}, {0, 530}
if model.Name = "Hacking The System... 20%" then
Bar.Frame.Size = {0, 20}, {0, 20}
Bar.Frame.Position = {0, 14}, {0, 520}
if model.Name = "Hacking The System... 30%" then
Bar.Frame.Size = {0, 20}, {0, 30}
Bar.Frame.Position = {0, 14}, {0, 510}
if model.Name = "Hacking The System... 40%" then
Bar.Frame.Size = {0, 20}, {0, 40}
Bar.Frame.Position = {0, 14}, {0, 500}
if model.Name = "Hacking The System... 50%" then
Bar.Frame.Size = {0, 20}, {0, 50}
Bar.Frame.Position = {0, 14}, {0, 490}
if model.Name = "Hacking The System... 60%" then
Bar.Frame.Size = {0, 20}, {0, 60}
Bar.Frame.Position = {0, 14}, {0, 480}
if model.Name = "Hacking The System... 70%" then
Bar.Frame.Size = {0, 20}, {0, 70}
Bar.Frame.Position = {0, 14}, {0, 470}
if model.Name = "Hacking The System... 80%" then
Bar.Frame.Size = {0, 20}, {0, 80}
Bar.Frame.Position = {0, 14}, {0, 460}
if model.Name = "Hacking The System... 90%" then
Bar.Frame.Size = {0, 20}, {0, 90}
Bar.Frame.Position = {0, 14}, {0, 450}
if model.Name = "Hacking The System... 100%" then
Bar.Frame.Size = {0, 20}, {0, 100}
Bar.Frame.Position = {0, 14}, {0, 440} then
Bar.Frame.Visible = false
Outside.Frame.Visible = false
end
end
end
end
end
end
end
end
end
end
end
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 07:39 AM
RAAAAGE IT STILL DOESNT WORK!

-You dun goofed
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
30 Dec 2011 07:49 AM
*INEFFICIENTNESS OVERHEAT. SELF-DESTRUCTION ACTIVATED*

Just kidding. Better if you post the whole script, I could make it more efficient (and working).
Report Abuse
PompeyTheGreat is not online. PompeyTheGreat
Joined: 10 Apr 2011
Total Posts: 5615
30 Dec 2011 08:07 AM
You can't see things that change in the StarterGui unless you respawn :-/

bon
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
30 Dec 2011 08:22 AM
omg this is too easy:

Bar.Frame.Size = UDim2.new(1,0,1,0) --{example}
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 11:38 AM
@Pompey, OH YEAH! What do I do then so people can see it.
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 12:04 PM
Bump, what do I do so players see the Guis without having to respawn.
Report Abuse
Zarcius is not online. Zarcius
Joined: 08 Dec 2007
Total Posts: 3024
30 Dec 2011 12:11 PM
Don't change the StarterGui, change the PlayerGui...
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 12:14 PM
How do you get this into all PlayerGuis...
Report Abuse
Zarcius is not online. Zarcius
Joined: 08 Dec 2007
Total Posts: 3024
30 Dec 2011 12:28 PM
If you have it in StarterGui, it will be automatically cloned over to the client side (PlayerGui) on the player's enter.
Report Abuse
manpan12 is not online. manpan12
Joined: 26 Mar 2010
Total Posts: 51
30 Dec 2011 01:04 PM
@ Nirvana, your script has a simple error,
gui.Size and gui.Position needs to use UDim2.new(POSITIONORGUIHERE)
Example on resizing,
gui.TextButton.Size = Vector3.new(5,5,5)
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
30 Dec 2011 01:13 PM
^ Typo
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 01:15 PM
I thought you don't use Vector3.new on Guis....

-You dun goofed
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 01:16 PM
Okay so I got the resizing and positioning to work. But it still won't become visible.

-You dun goofed
Report Abuse
FlappydavidINC is not online. FlappydavidINC
Joined: 20 May 2011
Total Posts: 694
30 Dec 2011 01:17 PM
If you want to get all the players GUIs then use this:

for i,v in pairs(game.Players:GetChildren()) do
--v:ClearAllChildren() :P--
for b,n in pairs(v.PlayerGuis:GetChildren()) do
--Now the script you posted
end
end
Report Abuse
FlappydavidINC is not online. FlappydavidINC
Joined: 20 May 2011
Total Posts: 694
30 Dec 2011 01:19 PM
You idiot(person who posted Vector3) it's UDim2.new! NOT Vector3.new, Vector3 means 3D, Vector2 means 2D(e.g. GUIs), but uses UDim2.new.
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 01:25 PM
Okay so I gathered all of the info everyone posted and here is what I got out of it.


for i,v in pairs(game.Players:GetChildren()) do
--v:ClearAllChildren() :P--
for b,n in pairs(v.PlayerGuis:GetChildren()) do
--Now the script you posted
end
end

Bar = game.StarterGui.Bar
Outside = game.StarterGui.Outside
model = script.Parent.Parent.Model
if model.Name = "Hacking The System... 1%" then
Bar.Frame.Visible = true
Outside.Frame.Visible = true
if model.Name = "Hacking The System... 10%" then
Bar.Frame.Size = UDim2.new(0,20,0,10)
Bar.Frame.Position = (0,14,0,530)
if model.Name = "Hacking The System... 20%" then
Bar.Frame.Size = UDim2.new(0,20,0,20)
Bar.Frame.Position = UDim2.new(0,14,0,520)
if model.Name = "Hacking The System... 30%" then
Bar.Frame.Size = UDim2.new(0,20,0,30)
Bar.Frame.Position = UDim2.new(0,14,0,510)
if model.Name = "Hacking The System... 40%" then
Bar.Frame.Size = UDim2.new(0,20,0,40)
Bar.Frame.Position = UDim2.new(0,14,0,500)
if model.Name = "Hacking The System... 50%" then
Bar.Frame.Size = UDim2.new(0,20,0,50)
Bar.Frame.Position = UDim2.new(0,14,0,490)
if model.Name = "Hacking The System... 60%" then
Bar.Frame.Size = UDim2.new(0,20,0,60)
Bar.Frame.Position = UDim2.new(0,14,0,480)
if model.Name = "Hacking The System... 70%" then
Bar.Frame.Size = UDim2.new(0,20,0,70)
Bar.Frame.Position = UDim2.new(0,14,0,470)
if model.Name = "Hacking The System... 80%" then
Bar.Frame.Size = UDim2.new(0,20,0,80)
Bar.Frame.Position = UDim2.new(0,14,0,460)
if model.Name = "Hacking The System... 90%" then
Bar.Frame.Size = UDim2.new(0,20,0,90)
Bar.Frame.Position = UDim2.new(0,14,0,450)
if model.Name = "Hacking The System... 100%" then
Bar.Frame.Size = UDim2.new(0,20,0,100)
Bar.Frame.Position = UDim2.new(0,14,0,440) then
Bar.Frame.Visible = false
Outside.Frame.Visible = false
end
end
end
end
end
end
end
end
end
end
end

Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 01:27 PM
Still won't work.

-You dun goofed
Report Abuse
nirvanadude is not online. nirvanadude
Joined: 28 Jan 2011
Total Posts: 3244
30 Dec 2011 01:33 PM
bump

-You dun goofed
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