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: Script not working, help?

Previous Thread :: Next Thread 
OppaDougieStyle is not online. OppaDougieStyle
Joined: 10 Oct 2012
Total Posts: 6
12 Oct 2012 12:46 PM
So, I have this script v

print 'Identifying player'
local owner = "OppaDougieStyle"
local h = script.Parent.Parent.Parent.Parent.Parent
if (h ~= nil) then
if h.Parent.Name ~= owner.Value then
print 'Player unknown'
script.Parent.Parent.Notice.Text = "20% LOADED"
script.Parent.Parent.BackgroundTransparency = "0.2"
wait (1)
script.Parent.Parent.BackgroundTransparency = "0.4"
script.Parent.Parent.Notice.FontSize = "Size18"
script.Parent.Parent.Notice.Text = "40% LOADED"
wait (1)
script.Parent.Parent.BackgroundTransparency = "0.6"
script.Parent.Parent.Notice.Text = "60% LOADED"
wait (1)
script.Parent.Parent.BackgroundTransparency = "0.8"
script.Parent.Parent.Notice.Text = "80% LOADED"
wait (1)
script.Parent.Parent.BackgroundTransparency = "1"
script.Parent.Parent.Notice.FontSize = "Size48"
script.Parent.Parent.Notice.Text = "100% LOADED"
wait (0.3)
print 'Load finished'
script.Parent.Parent.Visible = false
else script.Parent.Parent.Parent.Parent.Parent.Visible = false
print 'Player identified'
end
end

And, it won't work, nothing was in the output except for the print ' ' things. Please help? I'm sorta new to this scripting stuff.

Output:
Identifying player
Player unknown
Load finished
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
12 Oct 2012 12:59 PM
print 'Identifying player'
local owner = "OppaDougieStyle"
local h = script.Parent.Parent.Parent.Parent.Parent
if (h ~= nil) then return end -- If the Player isn't there, then don't run. (I believe that's what h is, however I may be wrong since you never said what it was)
if h.Parent.Name ~= owner then -- .Value was NOT needed. You've set a variable as a string, and there's NO .Value to it.
print 'Player unknown'
script.Parent.Parent.Notice.Text = "20% LOADED"
script.Parent.Parent.BackgroundTransparency = 0.2 -- Transparency is NOT a string, it's a number, therefore it does NOT need quotations either side.
wait (1)
script.Parent.Parent.BackgroundTransparency = 0.4
script.Parent.Parent.Notice.FontSize = "Size18"
script.Parent.Parent.Notice.Text = "40% LOADED"
wait (1)
script.Parent.Parent.BackgroundTransparency = 0.6
script.Parent.Parent.Notice.Text = "60% LOADED"
wait (1)
script.Parent.Parent.BackgroundTransparency = 0.8
script.Parent.Parent.Notice.Text = "80% LOADED"
wait (1)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.Notice.FontSize = "Size48"
script.Parent.Parent.Notice.Text = "100% LOADED"
wait (0.3)
print 'Load finished'
script.Parent.Parent.Visible = false
else
script.Parent.Parent.Parent.Parent.Parent.Visible = false
print 'Player identified'
end

I've pointed out the only mistakes I could find after a quick skim read.
Report Abuse
OppaDougieStyle is not online. OppaDougieStyle
Joined: 10 Oct 2012
Total Posts: 6
12 Oct 2012 01:12 PM
Thanks, I've changed the errors but now the output stops 'Identifying player' and the screen just has 20% on it, doesn't move.
Report Abuse
OppaDougieStyle is not online. OppaDougieStyle
Joined: 10 Oct 2012
Total Posts: 6
12 Oct 2012 01:12 PM
Thanks, I've changed the errors but now the output stops at 'Identifying player' and the screen just has 20% on it, doesn't move*
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
12 Oct 2012 02:00 PM
Eh, whoops. Didn't read one of the lines correctly. You need to change the fourth line to "if (h == nil) then return end".
Report Abuse
OppaDougieStyle is not online. OppaDougieStyle
Joined: 10 Oct 2012
Total Posts: 6
12 Oct 2012 02:33 PM
Yeah, but it still shows me the GUI? Shouldn't it not be visible to me since I'm the owner?
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