|
game.Players.PlayerAdded:connect(function(p)
if p.Name == "Player" then
game.Lighting.ScreenGui.Parent = game.Players.PlayerGui
wait(3)
game.Players.PlayerGui.ScreenGui:remove()
end
|
|
|
Please, I need to know! It says there is an error on line 2! Idk what that error is! |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
Whats the function suppose to do cause I'm so confused... |
|
|
It's supposed to take the ScreenGui from Lighting to PlayerGui so people can see it and then destroy it. |
|
nackerJoin Date: 2009-10-06 Post Count: 6034 |
fixed version:
game.Players.PlayerAdded:connect(function(p)
if p.Name == "Player" then
game.Lighting.ScreenGui.Parent = game.Players.PlayerGui
wait(3)
game.Players.PlayerGui.ScreenGui:remove()
end
end) |
|
|
end
end)
That should fix the problem. |
|
|
When a person joins.
(btw, I meant remove, not destroy :3) |
|
|
omg, I tried it the other way. LOL! Thanks |
|
UncleTazJoin Date: 2009-08-19 Post Count: 12795 |
Why do all of that?
Just put the GUI in StarterGUI > Change the transparency to 1 > wait(0) > change the transparency to 0 > wait (##) > Then remove it? On player enter? |
|
|
BUT... the gui doesn't even show! Did I use a wrong parent? |
|
|
PlayerGui would only effect that specific player's GUI, not sure about the transparency though. |
|
|
Maybe it's the second line causing the problem?. |
|
|
I'm really just learning how to script and experimenting. I have no idea on how to fix these types of errors. Usually, if it doesn't show up, I try one last time then delete it. But this is a project I am working on and I want it to work. Could someone with more experience just tell me what I am doing wrong or which parent I put the gui in for it to work? |
|
|
After looking at the original post I think I know what the problem is, you need to use
game.Lighting.ScreenGui.Parent = p.PlayerGui |
|
|
Idk if it was just because I was in test mode, but that doesn't work. |
|
|
Try changing "Player" to "Player1". |
|
|
Also, change game.Players.PlayerGui.ScreenGui:remove() to
p.PlayerGui.ScreenGui:remove() |
|
|
Wait! I found it out now!
game.Players.PlayerAdded:connect(function(p)
game.Lighting.ScreenGui.Parent = p.PlayerGui
wait(3)
p.PlayerGui.ScreenGui:remove()
end) |
|
|
Yes, the reason why you were having those errors besides the initial end problems was because you didn't specify to the game's engine logic the specific player, you specified essentially every player. |
|
|
How have I been so stupid? |
|
|
Don't get upset, we all make mistakes, none of us are perfect in any form.
Even we made mistakes while trying to help you, regardless of the severity mistakes teach us experience so go on ahead and continue scripting and you will make more unintentional mistakes eventually, examine and learn from them. |
|
|