|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|