In one of my games, I’m making an ultimate attack, however ive noticed that during the animation, the players hitbox is changed, and im not sure whats causing it
https://gyazo.com/e114ac1a803ed394e32df0e922b5eda0 Normal hitboxes (animation isn’t played)
https://gyazo.com/2e781ddeb4a1fdbef8b3cdaa930d53ed Changed hitboxes (animation is played)
https://gyazo.com/9d013279cc48075106be2d8efa74bf9d this is halfway through the animation and at the kick part is where the hitbox changes, its not anything with the kick parts, and it seems to be caused somehow by the characters moving while in the animation, anybody know what to do to fix this?
I believe that you have added some kind of parts inside when the animation is played, and simply didn’t completely removed it from the player model. Since the player is a Model
that is why the hitbox changed its size to cover all the parts in the model.
The animation was made by a friend, but he says he added nothing in the animation, i can include the script for the attack if it helps, i also looked in the dummy and it doesn’t show anything being added part wise
That would be perfect if you can add a portion of code where the animation is played. Also any kinds of remote events or function that has been linked with this animation function.
This is part of the script that does the animation
HumRP.CFrame = EHumrp.CFrame * CFrame.new(0,0,-4)
HumRP.CFrame = CFrame.new(HumRP.Position, EHumrp.Position)
EHumrp.CFrame = CFrame.new(EHumrp.Position, HumRP.Position)
HumRP.Anchored = true
EHumrp.Anchored = true
--EHum.HipHeight = 1.35
--sound:Play()
local IFrame = Instance.new("BoolValue",Char)
IFrame.Name = "IFrame"
game.Debris:AddItem(IFrame,9)
local IFrame2 = Instance.new("BoolValue",Hit.Parent)
IFrame2.Name = "IFrame"
game.Debris:AddItem(IFrame2,9)
local Stun = Instance.new("BoolValue")
Stun.Name = "Stun"
Stun.Parent = Char
game.Debris:AddItem(Stun,9)
local EStun = Instance.new("BoolValue")
EStun.Name = "Stun"
EStun.Parent = Hit.Parent
game.Debris:AddItem(EStun,9)
local Animator = Hum:FindFirstChildWhichIsA("Animator")
local Track = Instance.new("Animation")
Track.AnimationId = "rbxassetid://12511471410"
local Anim = Animator:LoadAnimation(Track)
local EAnimator = EHum:FindFirstChildWhichIsA("Animator")
local ETrack = Instance.new("Animation")
ETrack.AnimationId = "rbxassetid://12511476182"
local EAnim = EAnimator:LoadAnimation(ETrack)
Anim:Play()
EAnim:Play()
UltCutscene:FireClient(player)
task.wait(5.4)
local function Kick()
for i = 1,52 do
wait(0.05)
print(HumRP.Position)
local x = Instance.new("Part", game.Workspace)
x.Name = "MultiKick"
x.Transparency = math.random(1,9) / 10
x.BrickColor = BrickColor.new("Persimmon")
x.Material = "Neon"
x.Size = Vector3.new(1,1,math.random(3,7))
x.CanCollide = false
--local Chara = player.Character or player.CharacterAdded:Wait()
x.CFrame = Char.HumanoidRootPart.CFrame * CFrame.new(8,0,-6) * CFrame.Angles(0,0,0)
x.CFrame = CFrame.new(x.CFrame.Position,Hit.Parent:WaitForChild("UpperTorso").Position)
x.CFrame = x.CFrame * CFrame.new(math.random(-2,2), math.random(-2,2), -3)
game.Debris:AddItem(x, .8)
local bv = Instance.new("BodyVelocity", x)
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv.Velocity = x.CFrame.lookVector*(40)
end
end
Kick()
EHum.Health = EHum.Health - 30
--task.wait(2.6)
HumRP.Anchored = false
EHumrp.Anchored = false
local BodyFly = Instance.new("BodyVelocity")
BodyFly.MaxForce = Vector3.new(1000000,0,1000000) -- y-component is 0 because we don't want them to fly
BodyFly.P = 100000
BodyFly.Velocity = HumRP.CFrame.LookVector * 120 --
BodyFly.Parent = EHumrp
wait(.3)
BodyFly:Destroy()
Or a simple way to do this, is to create an event that track a player model inside the StarterCharacterScripts
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
character.ChildAdded:Connect(function(child)
print(child ,"part has been added inside the model, this must be deleted")
end)
-- The script simply check if any parts have been added when the player is loaded.
Just checked it, only things added are the Iframe and Stun values, its gotta be something involved in the animation
yep, have you tried my script to check if there is anything extra has been secretly added inside the player model?
yep, nothing besides the iframe and stun values were added, no parts added either
Does the bigger hitbox show up when you click the player model? and Does it move when you manually move the model?
By the way, those parts should be removed anyway besides the problem that you have.
It appears when you click, however i check every part and none of them appear to be it, though it appears when i click the model, and when i move the model on the server it somehow goes back to normal
yea those get destroyed by debris so don’t worry about them
Yep, my mistake, I totally forgot that DebrisService has been implemented. My suggestion would be to see if the bigger hitbox ruins the UX, for example, does it collide with other parts that prevent you from moving?, does it give other players’ advantage to hit you with bigger hitbox? etc. If it doesn’t, leave it. This might be a bug with animations, or I just can’t solved it.
So it seems like its not an actual bigger hitbox, however it can cause some problems with both player and dummy
https://gyazo.com/436c4cfe0de2c00e43619e98a76e42e2 Players affected
https://gyazo.com/019306e73a73d9444acfe65ec0eaae9f Dummy affected
Players somehow seem to be fixed once another animation is played (i used my m1 to fix myself)
and the dummy seems to fling himself, guessing the weird hitbox and bodyvelocity causes him to fling
One solution im thinking about is having a single frame animation that plays and instantly ends, so itll force them to have an animation and potentially fix it
just tried it, animation at the end did not fix it
Can you check if all added elements have been removed completely once the animation is ended? Right away after the animation ended.
sorry i don’t understand, what do you mean by elements?
Like stun, bodyVelocity, iFrame that has been added. Do they get removed right away when the animation ended. I know that they will be eventually removed, but the timing may cause the problem.
So just checked, they last slightly longer than the animation but they shouldn’t affect anything since they are just bool values