|
| 06 Jul 2016 08:32 AM |
Ok, I have 2 statues. When one dies, i have this in its head
script.Parent.Humanoid.Died:connect(function() local m = Instance.new("Message",workspace) local m.Text = "Game over! Noobs killed your statue!" game:GetService("Debris"):AddItem(m, 5)
end)
Should that just go into the model?
Also, how do i make it reset the game, and remove everyones leaderboard stats? |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 06 Jul 2016 08:33 AM |
1) that shouldn't go inside the head, reread the first line
2) when you define a local variable you don't need to say "local" again to define its properties
Formerly ToxicDominator - add 17,509 posts | :(){:|:&};: |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2016 08:40 AM |
| OK... How to make it reset game? |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 06 Jul 2016 08:42 AM |
I can't tell you that, I don't even know what kind of game you're making
Formerly ToxicDominator - add 17,509 posts | :(){:|:&};: |
|
|
| Report Abuse |
|
|
MysticKey
|
  |
| Joined: 28 May 2016 |
| Total Posts: 139 |
|
|
| 06 Jul 2016 08:46 AM |
Leaderboard stats script put in game.Workspace game.Workspace.STATUENAME.Humanoid.Died:connect(function() for i,v in pairs(game.Players:GetChildren()) do if v:FindFirstChild("leaderstats") ~= nil then v.leaderstats.STATNAME.Value = 0 -- Add more if you need too! break end end end)
|
|
|
| Report Abuse |
|
|
|
| 06 Jul 2016 08:56 AM |
| Ok, thanks but can you make it so it respawns them? And removes everyones tools in backpack? |
|
|
| Report Abuse |
|
|
MysticKey
|
  |
| Joined: 28 May 2016 |
| Total Posts: 139 |
|
|
| 06 Jul 2016 09:07 AM |
-- Kills for i,v in pairs(game.Workspace:GetChildren()) do if v:FindFirstChild("Humanoid") ~= nil then v:BreakJoints() end end -- Removes Tools for i,v in pairs(game.Players:GetChildren()) do v.Backpack:ClearAllChildren() end
|
|
|
| Report Abuse |
|
|