generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help?

Previous Thread :: Next Thread 
QuantumWaffle is online. QuantumWaffle
Joined: 21 Apr 2011
Total Posts: 95
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 is not online. 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
QuantumWaffle is online. QuantumWaffle
Joined: 21 Apr 2011
Total Posts: 95
06 Jul 2016 08:40 AM
OK... How to make it reset game?
Report Abuse
Skellobit is not online. 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 is not online. 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
QuantumWaffle is online. QuantumWaffle
Joined: 21 Apr 2011
Total Posts: 95
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image