WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
It doesn't work putting the script in startergui, as it runs everytime. This script isn't working either
game.Players.playerAdded:connect(function(player)
Clone.Parent = player.StarterGui
Clone.Disabled = false |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
that script should clone the script and move it into their starterpack once they join the server |
|
PrizfulJoin Date: 2010-03-15 Post Count: 1143 |
I'm not an Expert but I'm pretty sure, the game.Players.PlayerAdded:connect(function(Forget what you said here,)
Should be at the end, this script will probably not work but heres and example,
function s(OnTouched)
game.Workspace.ThatBrick.Touched.findFirst("Humanoid")
More coding..... more.....
end
game.Workspace.Thatbrick.Touched:connect(OnTouched)
I believe that's how it works. |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
Isn't that just a shorthand if you're using the same function many times? |
|
PrizfulJoin Date: 2010-03-15 Post Count: 1143 |
I'm not sure. That's how I learned it. After end you add the connecting line. But, I'm only a beginner so I could be wrong. Just thought I could help :/
~Lua Learner~ |
|
As8DJoin Date: 2009-12-24 Post Count: 2907 |
Dunno what the rest of your script is, but I see the "Clone" variable as nil. I assume you have
local Clone = script
somewhere before in the script.
But I just think "You're cloning the script without any checks or so..."
Uh, bad explanation ^
But yeah, you're missing something that will stop it from cloning itself when located in the PlayerGui or so. I won't help you at that point.
- As, CustomEventReceiverwhaaat? |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
sorry its this:
Clone = script.welcomescript:clone()
it isn't cloning itself but another script named welcomescript |
|
As8DJoin Date: 2009-12-24 Post Count: 2907 |
Okay...
Hold on a second!
StarterGui... ahem *cough*...
Try PlayerGui c:!
- As, hm, didn't knew about Players having StarterGuis in them. |
|
UnBuildJoin Date: 2013-03-22 Post Count: 3233 |
Im lazy so I always just put a object (Normally a model) in the player from the welcome gui and name it something and have the welcome gui check if its there, if it is remove the gui |
|
btftJoin Date: 2011-02-19 Post Count: 1597 |
--define clone pls
game.Players.PlayerAdded:connect(function(player)
Clone.Parent = player.StarterGui
Clone.Disabled = false
end) |
|
btftJoin Date: 2011-02-19 Post Count: 1597 |
game.Players.PlayerAdded:connect(function(player)
--define clone pls
Clone.Parent = player.StarterGui
Clone.Disabled = false
end)
srry |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
this script
game.Players.PlayerAdded:connect(function(player)
Clone = script.Parent.welcomescript:Clone()
Clone.Parent = player.StarterGui
Clone.Disabled = false
end)
didn't work, any suggestions |
|
|
Game.Players.PlayerAdded:connect(function(player)
local Clone = script.Parent.welcomescript:Clone()
Clone.Parent = player:WaitForChild("PlayerGui")
Clone.Disabled = false
end)
(╯°д°)> KMXD |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
That isn't working and there is no output, he doesn't have it in startergui though |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
thanks for trying to help though guys |
|
WowgnomesJoin Date: 2009-09-27 Post Count: 26255 |
i messed around with the code a bit and the correct thing is
function touch(player)
while player:FindFirstChild("PlayerGui") == nil do
wait(.1)
end
p = game.Lighting.special:clone()
p.Parent = player.PlayerGui
end
game.Players.PlayerAdded:connect(touch) |
|
jonesj627Join Date: 2010-10-06 Post Count: 1496 |
yo
You only run once thats lua, scripts yoro |
|
UnBuildJoin Date: 2013-03-22 Post Count: 3233 |
@Wow
Player:WaitForChild("PlayerGui") |
|
gulletJoin Date: 2008-08-14 Post Count: 96 |
Super late but THANKS<3 |
|