Noahjw17
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 107 |
|
|
| 02 Apr 2014 02:58 PM |
| I need to know how to make it so that when someone kills a zombie running around in my tycoon game, the get (number) points. So they kill "King zombie" and recieve 1,000 points, which they can use to buy a "turret" for 1,000 points. Get it? |
|
|
| Report Abuse |
|
|
Noahjw17
|
  |
| Joined: 21 Jan 2013 |
| Total Posts: 107 |
|
| |
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 02 Apr 2014 03:02 PM |
| Do your weapons/tools 'tag' the zombies they hit? |
|
|
| Report Abuse |
|
|
4colby13
|
  |
| Joined: 02 Feb 2013 |
| Total Posts: 302 |
|
|
| 02 Apr 2014 03:04 PM |
| http://www.roblox.com/Points-on-Kill-Leaderboard-FAV-BEFORE-TAKING-item?id=69948585 |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 02 Apr 2014 03:10 PM |
--In the sword, if it's a gun then you'll have to put this in the raycast part., edit the 'Leaderstats' and 'Points' to the names of your leaderstats and points values.
local x = --Amount of points for killing normal zombie
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then --Damage if hit.Parent.Humanoid.Health == 0 then if hit.Parent.Name == "King zombie" then local plr = game.Players:GetPlayerFromCharacter(script.Parent.Parent) plr.Leaderstats.Points = plr.Leaderstats.Points + 1000 else plr.Leaderstats.Points = plr.Leaderstats.Points + x end end end end end)
--Make a gui and put a TextButton in it for buying the turret and put this script in the TextButton, put the turret in lighting and name it 'Turret', again edit the 'Leaderstats' and 'Points' to the names of your leaderstats and points values.
script.Parent.MouseButton1Down:connect(function() pts = game.Players.LocalPlayer.Leaderstats if pts.Points >= 1000 then pts.Points = pts.Points - 1000 game.Lighting.Turret:Clone().Parent = game.Players.LocalPlayer.Backpack end end)
|
|
|
| Report Abuse |
|
|