|
| 08 Mar 2015 01:23 PM |
game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character player.Character:FindFirstChild("Humanoid").Died:connect(function() if player.Class.Value == "Pusher" then game.ServerStorage.Terraformer:Clone().Parent = player.Backpack elseif player.Class.Value == "Guard" then game.ServerStorage.Sword:Clone().Parent = player.Backpack end end) end) |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:27 PM |
Well, in order to end a repeat loop you need until.
repeat
code here
until
http://wiki.roblox.com/index.php?title=Loops#Repeat |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:28 PM |
Wait, nevermind. Scratch that. I read it wrong.
I'll look into it, I don't see an error. Is the console clean? |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:29 PM |
| I'm making sure the character exists, not waiting till a value reaches something. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:30 PM |
Ninja'd.
And no, there's no output at all. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:31 PM |
game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character player.Character:FindFirstChild("Humanoid").Died:connect(function() if player.Class.Value == "Pusher" then game.ServerStorage.Terraformer:Clone() :Clone().Parent = player.Backpack elseif player.Class.Value == "Guard" then game.ServerStorage.Sword:Clone() :Clone().parent = player.Backpack end end) end)
|
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:33 PM |
| Isn't that exactly what I put? It's not working. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:38 PM |
Well I changed the game.ServerStorage.Sword:Clone().Parent = player.Backpack
game.ServerStorgage.Sword:Clone() :Clone().Parent = player.Backpack
I did the same thing how you did it on my holo I was scripting, it wouldn't load a map, so I used two separate lines to clone it from ServerStorage and move the clone to a new parent. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:38 PM |
| It works the exact same either way. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:41 PM |
> game.ServerStorgage.Sword:Clone() > :Clone().Parent = player.Backpack
Where did you get the idea that this makes any logical sense at all? |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:42 PM |
| Can you help me figure out what the problem is, please? |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:43 PM |
Well, King. I did the same thing within my holo scripting, and it works.
FreeForAll = game.Lighting.FreeForAll player4 = game.Players.LocalPlayer
textButton4.MouseButton1Down:connect(function(player4) game.Lighting.FreeForAll:Clone() :Clone().Parent = game.Workspace wait(0.03) local Message = Instance.new("Message") Message.Parent = game.Workspace Message.Text = "FreeForAll Loaded! Please wait for further instruction!" wait(1) Message:remove() end)
|
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:44 PM |
| "Can you help me figure out what the problem is, please?" |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:45 PM |
> Well, King. I did the same thing within my holo scripting, and it works.
You do realize that what you did is copy it, and then copy it again and then use that? You copied it twice.
I guarantee that this will work as well, but more effectively:
FreeForAll = game.Lighting.FreeForAll player4 = game.Players.LocalPlayer
textButton4.MouseButton1Down:connect(function(player4) game.Lighting.FreeForAll:Clone().Parent = game.Workspace wait(0.03) local Message = Instance.new("Message") Message.Parent = game.Workspace Message.Text = "FreeForAll Loaded! Please wait for further instruction!" wait(1) Message:remove() end)
|
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:45 PM |
| Again, can you help me with MY SCRIPT? Please.. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 01:50 PM |
| There aren't any real problems with your script, but are you sure you want to clone the things into the backpack as they die? |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 02:20 PM |
| Should I wait until the players respawn? How would I check for that. |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Mar 2015 03:48 PM |
Instead of checking when the humanoid died, check when the character is added.
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() if player.Class.Value == "Pusher" then game.ServerStorage.Terraformer:Clone().Parent = player.Backpack elseif player.Class.Value == "Guard" then game.ServerStorage.Sword:Clone().Parent = player.Backpack end end) end) |
|
|
| Report Abuse |
|
|