of     1   

tom2cute
#159806338Friday, April 10, 2015 12:12 AM GMT

I took the dodgeball model from ROBLOX Battle and placed it in my dodgeball game, without teams the ball doesn't damage people, with teams the ball still doesn't damage people? What line am I missing which indicates why it's not working? print("Running cannon ball script") local ball = script.Parent local function WaitForChild(parent, childName) while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end return parent[childName] end --local KILL_FEED_ICON_URL = 'rbxasset://Textures/Superball.png' local START_DAMAGE = 42 local MIN_DAMAGE = 10 local DECAY_RATIO = 1 / 1.65 local VELOCITY_DAMPING = 0.9 local BOING_VOLUME = 0.666 local damage = START_DAMAGE local DebrisService = Game:GetService('Debris') local BounceScript = WaitForChild(script, 'BounceEffect') local IsMoneyBall= WaitForChild(script,'IsMoneyBall') local MyHumanoid local r = game:service("RunService") local last_sound_time = r.Stepped:wait() - 0.2 local LastHitCharacter local LastDamageHumanoid = nil local DecalHolder = Instance.new("Part") DecalHolder.Size = Vector3.new(2, 2, 2) DecalHolder.Anchored = true DecalHolder.CanCollide = false DecalHolder.Transparency = 0.5 DecalHolder.Reflectance = 0 DecalHolder.FormFactor = Enum.FormFactor.Custom DecalHolder.Shape = Enum.PartType.Block DecalHolder.Size = Vector3.new(0.1, 0.1, 0.1) DecalHolder.BottomSurface = 0 DecalHolder.TopSurface = 0 DecalHolder.Name = "Bounce Spot" local DecalMesh = Instance.new('SpecialMesh') DecalMesh.Name = "BounceMesh" DecalMesh.MeshType = Enum.MeshType.Sphere DecalMesh.Scale = Vector3.new(1,1,1) DecalMesh.Parent = DecalHolder local MoneySound = Instance.new('Sound') MoneySound.Name = 'MoneySound' MoneySound.SoundId = 'http://www.roblox.com/Asset?ID=97688233' MoneySound.Volume = 1 MoneySound.Parent=DecalHolder function FindHumanoidRecursive(p) if (p.className == Workspace) then return nil end local h = p:FindFirstChild("Humanoid") if (h ~= nil) then return h end if (p.Parent ~= nil) then return FindHumanoidRecursive(p.Parent) end return nil end local function CheckAwardSuperballRicochet(humanoid, damage) local creatorTag = ball:FindFirstChild('creator') local myHumanoid = creatorTag and creatorTag.Value and creatorTag.Value.Character and creatorTag.Value.Character:FindFirstChild('Humanoid') --print("Checking rico myHumanoid is" , myHumanoid , "other humanoid is:" , humanoid) if myHumanoid and humanoid ~= myHumanoid and humanoid.Health <= damage and LastDamageHumanoid and LastDamageHumanoid ~= humanoid then --print("awarding ricochet") _G.AwardBadge(creatorTag.Value, 3) end end function CreateBounceEffect(position) local DecalCopy = DecalHolder:Clone() DecalCopy.Size = ball.Size DecalCopy.BrickColor = ball.BrickColor DecalCopy.CFrame = CFrame.new(position) DebrisService:AddItem(DecalCopy, 2) DecalCopy.Parent = Workspace local bounceCopy = BounceScript:Clone() bounceCopy.Parent = DecalCopy bounceCopy.Disabled = false Spawn(function() wait(0) if IsMoneyBall.Value and DecalCopy then DecalCopy.MoneySound:Play() end end) end function onTouched(hit) local myHumanoid local creatorTag = ball:FindFirstChild('creator') if creatorTag and creatorTag.Value and creatorTag.Value.Character then myHumanoid = creatorTag.Value.Character:FindFirstChild('Humanoid') end local humanoid = FindHumanoidRecursive(hit) if humanoid~=nil then -- make sure not to damage yourself unless it has bounced already if myHumanoid and (humanoid ~= myHumanoid or damage < START_DAMAGE) and (not LastHitCharacter or humanoid.Parent ~= LastHitCharacter) then LastHitCharacter = humanoid.Parent --TagHumanoid(humanoid, ball.creator.Value) --humanoid:TakeDamage(damage) local hitBindable = humanoid:FindFirstChild('Hit') if hitBindable then local wasAlive = humanoid.Health > 0 LastDamageHumanoid = humanoid hitBindable:Invoke(damage, ball:FindFirstChild('creator')) if wasAlive and humanoid.Health <= 0 then CheckAwardSuperballRicochet(humanoid, damage) end else print("Could not find BindableFunction 'Hit'") end end else local now = r.Stepped:wait() if (now - last_sound_time > 0.32) then ball.Boing.Volume = math.max(0.17, math.min(BOING_VOLUME, BOING_VOLUME * ball.Velocity.magnitude / 130)) --print(ball.Boing.Volume) ball.Boing:play() last_sound_time = now damage = math.max(MIN_DAMAGE, damage * DECAY_RATIO) --ball.Velocity = ball.Velocity * VELOCITY_DAMPING CreateBounceEffect(ball.Position) end if now - last_sound_time > 0.3 then print("Resetting last hit character") LastHitCharacter = nil end end end --[[ function TagHumanoid(humanoid, player) print("Tagging player as creator:" , player.Name , "as damaging" , humanoid.Name , tick()) -- Add more tags here to customize what tags are available. while humanoid:FindFirstChild('creator') do humanoid:FindFirstChild('creator'):Destroy() end local creatorTag = Instance.new("ObjectValue") creatorTag.Value = player creatorTag.Name = "creator" creatorTag.Parent = humanoid DebrisService:AddItem(creatorTag, 2) local weaponIconTag = Instance.new("StringValue") weaponIconTag.Value = KILL_FEED_ICON_URL weaponIconTag.Name = "icon" weaponIconTag.Parent = creatorTag end --]] connection = ball.Touched:connect(onTouched) DebrisService:AddItem(ball, 2)
tom2cute
#159806600Friday, April 10, 2015 12:16 AM GMT

mh
TheScriptingScripter
#159807134Friday, April 10, 2015 12:22 AM GMT

Out.
tom2cute
#159817275Friday, April 10, 2015 2:17 AM GMT

Give me a legitimate reason first.
tom2cute
#159817509Friday, April 10, 2015 2:19 AM GMT

Mhm
tom2cute
#159840533Friday, April 10, 2015 11:42 AM GMT

hi
powerhotmail123
#159840560Friday, April 10, 2015 11:43 AM GMT

You don't just take something. Learn from it, and then make your own.
lampwnage121
#159840654Friday, April 10, 2015 11:45 AM GMT

How about learning how comment lines are made and searching up "Damage". Doing that, you'd realize the damage part is commented out of the actual script thus never executed.
tom2cute
#159842020Friday, April 10, 2015 12:25 PM GMT

why does it work in ROBLOX battle then
tom2cute
#159842414Friday, April 10, 2015 12:36 PM GMT

mhmhmhm
tom2cute
#159842677Friday, April 10, 2015 12:43 PM GMT

ahhhhhhhhhhhh
tom2cute
#159842833Friday, April 10, 2015 12:49 PM GMT

awwwwwww
tom2cute
#159843131Friday, April 10, 2015 12:57 PM GMT

meaniessssssssssssss
SkyMustang
#163078195Wednesday, May 27, 2015 1:41 AM GMT

well, basically what i did is i took a free dodgeball in the models in roblox studio and then i saw that the dodgeball i took damages people. so when you type "dodgeball" into the search bar for free models, you will see several options. so ask your friend to help you try out all the first 4 dodgeballs that will show up and see if they damage anybody. Hope this helped!
Scripterity
#163078229Wednesday, May 27, 2015 1:42 AM GMT

You bumped an old thread.
llaserx
#163080187Wednesday, May 27, 2015 2:07 AM GMT

tom2cute
#163095859Wednesday, May 27, 2015 8:09 AM GMT

That kid's first post was on my thread, what a scrub he is. Oh and I fixed it so get rekt.

    of     1