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 » Scripting Helpers
Home Search
 

Re: KO problem.

Previous Thread :: Next Thread 
CommanderJohnBaggs is not online. CommanderJohnBaggs
Joined: 12 Jul 2011
Total Posts: 48
18 Jul 2011 12:57 PM
The leaderboard does not count KO's from this weapon, here is the damage script, can soembody please fix it so that it will? The eladerboard is working fine for other weapons!

Many thanks:

deb = script.Debounce.Value

function animate(anim)
val = Instance.new("StringValue")
val.Name = "toolanim"
val.Parent = script.Parent
val.Value = anim
end

function damage(t,d,m)
t.Parent.Humanoid.Health = t.Parent.Humanoid.Health - d
p = Instance.new("Part")
p.BrickColor = BrickColor.new(21)
p.Transparency = 1
p.Reflectance = 0
p.formFactor = script.Parent.Handle.formFactor
p.Shape = 1
p.FormFactor = 2
p.Size = Vector3.new(0.4,3,5)
p.TopSurface = 0
p.BottomSurface = 0
p.CanCollide = false
p.Anchored = true
p.Position = t.Position + Vector3.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10)
p.Parent = game.Workspace
local decal = Instance.new("Decal")
decal.Face = 3
decal.Texture = ""
decal.Parent = p

local bottomDecal = decal:Clone()
bottomDecal.Face = 0
bottomDecal.Parent = p

s = script.Remover:clone()
s.Disabled = false
s.Parent = p
if m == "yes" then
end
end

function hit(touch)
if touch.Parent ~= script.Parent.Parent then
if touch.Parent:FindFirstChild("Humanoid") ~= nil and script.Parent.Active.Value == true then
if deb == true then
deb = false
find = touch.Parent:FindFirstChild("Master Sword")
if find ~= nil then
if find.Blocking.Value == false then
damage(touch,50,"no")
elseif find.Blocking.Value == true then
end
elseif find == nil then
damage(touch,50,"no")
end
wait(0.1)
deb = true
end
elseif touch.Parent:FindFirstChild("Humanoid") ~= nil and script.Parent.RightActive.Value == true then
if deb == true then
deb = false
find = touch.Parent:FindFirstChild("Master Sword")
if find ~= nil then
if find.Blocking.Value == false then
damage(touch,55,"no")
elseif find.Blocking.Value == true then
end
elseif find == nil then
damage(touch,55,"no")
end
wait(0.1)
deb = true
end
elseif touch.Parent:FindFirstChild("Humanoid") ~= nil and script.Parent.ChargeActive.Value == true then
if deb == true then
deb = false
find = touch.Parent:FindFirstChild("Master Sword")
if find ~= nil then
if find.Blocking.Value == false then
damage(touch,55,"no")
elseif find.Blocking.Value == true then
end
elseif find == nil then
damage(touch,55,"no")
end
wait(0.1)
deb = true
end
end
end
end

script.Parent.Claw.Touched:connect(hit)
script.Parent.Claw2.Touched:connect(hit)
Report Abuse
Robert00001 is not online. Robert00001
Joined: 15 May 2010
Total Posts: 7965
18 Jul 2011 01:19 PM
function damage(t,d,m)
local tag = Instance.new("ObjectValue")
tag.Name = "creator"
tag.Value = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
tag.Parent = t.Parent.Humanoid
t.Parent.Humanoid.Health = t.Parent.Humanoid.Health - d
p = Instance.new("Part")
p.BrickColor = BrickColor.new(21)
p.Transparency = 1
p.Reflectance = 0
p.formFactor = script.Parent.Handle.formFactor
p.Shape = 1
p.FormFactor = 2
p.Size = Vector3.new(0.4,3,5)
p.TopSurface = 0
p.BottomSurface = 0
p.CanCollide = false
p.Anchored = true
p.Position = t.Position + Vector3.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10)
p.Parent = game.Workspace
local decal = Instance.new("Decal")
decal.Face = 3
decal.Texture = ""
decal.Parent = p

local bottomDecal = decal:Clone()
bottomDecal.Face = 0
bottomDecal.Parent = p

s = script.Remover:clone()
s.Disabled = false
s.Parent = p
if m == "yes" then
end
end

--?

~ ROBERT00001 ~
~(ಠωಠ)~
Report Abuse
CommanderJohnBaggs is not online. CommanderJohnBaggs
Joined: 12 Jul 2011
Total Posts: 48
18 Jul 2011 01:27 PM
Original purpose was so when someone was hit it would appear that "Owned!" would rise up from their body, changed decal to nothing so now it appears that nothing happens.
Report Abuse
CommanderJohnBaggs is not online. CommanderJohnBaggs
Joined: 12 Jul 2011
Total Posts: 48
18 Jul 2011 02:12 PM
Bump, pelase guys this is really bothering me.
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
18 Jul 2011 02:15 PM
You can't really complain about something bothering you, because a few hours ago you bothered us all.

-My hand is a dolphin
Report Abuse
CommanderJohnBaggs is not online. CommanderJohnBaggs
Joined: 12 Jul 2011
Total Posts: 48
18 Jul 2011 02:23 PM
You didn't have to read my post.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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