|
| 09 Oct 2017 03:49 AM |
| In my game I made a punching script and it is really hard to land a hit but I don't know how to make the hit box larger. Any help please? |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2017 03:52 AM |
| i have no idea what kind of script you use to test hit |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2017 03:58 AM |
CanDamage = script.CanDamage.Value player = script.Parent.Parent character = player.Character Mouse = player:GetMouse() local Humanoid = character.Humanoid local animation = script.PunchAnimation CanDamage = false local Player = game.Players.LocalPlayer
Mouse.KeyDown:connect(function(Key) if Key == "q" then local Humanoid = character.Humanoid CanDamage = true local animTrack = Humanoid:LoadAnimation(animation) local touchedConnection = character.RightHand.Touched:connect(onTouch) animTrack:Play() wait(0.1) CanDamage = false end end)
function onTouch(part) if CanDamage == true then if part.Parent:FindFirstChild("Humanoid") then local humanoid = part.Parent:FindFirstChild("Humanoid") humanoid:TakeDamage(5+(character.Str.Value)) end end end
Sorry if the script is not very good Im a beginner |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2017 04:00 AM |
| theres a variable called touched connection that is nowhere used in the rest of the script |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2017 04:07 AM |
| so it works, ok, but i think because the hands are like ###### or something and they have a false can collide, they're actualy position is somewhere else? like say humanoid hip height, i dont know any way to do it so... |
|
|
| Report Abuse |
|
|