kalkaraJoin Date: 2008-10-08 Post Count: 576 |
So this works fine the first time, but the second time when I died it didn't do anything. I didn't even get an error. |
|
|
Please, give us more information such as the script or we won't be able to help you. |
|
wish_zJoin Date: 2009-02-11 Post Count: 15392 |
you have to apply it every time the character is added |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
game.Players.kalkara.Character.Died:connect(function()
local cl = game.Players.kalkara.PlayerGui.SGI:Clone()
repeat wait(1) until
game.Players.kalkara.Character.Humanoid.Health > 0;
cl.Parent = game.Players.kalkara.PlayerGui
end) |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
so do game.Players.kalkara.CharacterAdded:connect(function()? |
|
wish_zJoin Date: 2009-02-11 Post Count: 15392 |
if it's in script builder or whatever, yeah. |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
It's not in script builder, but i'll check if that fixes it. |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
game.Players.kalkara.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
local SG = game.Players.kalkara.PlayerGui:FindFirstChild("Shouts Gui"):Clone()
repeat wait() until
game.Players.kalkara.Character.Humanoid.Health > 0
SG.Parent = game.Players.kalkara.PlayerGui
end)
end)
Doesn't error, but also doesn't work. |
|
|
Did you test that in Roblox Studio?. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
char:WaitForChild("Humanoid").Died:connect(function()
local SG = player.PlayerGui:FindFirstChild("Shouts Gui"):Clone()
wait(5)--default respawn time
SG.Parent = player.PlayerGui
end)
end)
end)
You do realise that the GUI does not get reset when a player does, right? |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
dies*
So this script is kinda pointless (unless you made GUIs reset on death). |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
Well it would be pointless, but the GUI was made in the script so it does reset on death (: |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
And yes Anony, I tested with clicking run, starting a server, and publishing to roblox and joining. |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
Also smiley the game.Players.PlayerAdded:connect() is completely irrelevant as the GUI is only given to myself. |
|
|
while wait() do
if game.Players:FindFirstChild("kalkara") and game.Workspace:FindFirstChild("kalkara") then
SG = game.Players.kalkara.PlayerGui:FindFirstChild("Shouts Gui"):Clone()
if game.Players.kalkara.Character.Humanoid.Health <= 0 then
SG.Parent = game.Players.kalkara.PlayerGui
end
end
end
|
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
That doesn't make it irrelevant-it's needed but you just add a bit.
But I don't really like your tone so I'm not doing it for you, kid. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
Such inefficiency...
|
|
|
|
Also, if you started a server in studio then your playername would have been "Player1", not "kalkara". |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
Anony, I did change it from kalkara to Player1. |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
Also smiley "kid" is irrelevant (: I am of age to be a teenager, and have been for a few years now. Sorry if you didn't like my tone. Also yes there is inefficiency because I've just gotten back into Lua recently. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
I didn't like how you assumed what I wrote was irrelevant.
It was completely relevant and if you wanted it for yourself only I could have done that for you. |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
I only meant the game.Players.PlayerAdded. I mean I guess maybe add a check after it to see if the player is kalkara? |
|
|
Enough already, he's been given solutions, starting an argument over something as simple as this which has already been solved will only serve to provoke potential future negativity between the scripting helper(s) and the topic creator. |
|
kalkaraJoin Date: 2008-10-08 Post Count: 576 |
Actually Anony, I still haven't gotten this to work. I have tried all the scripts you guys have provided. |
|