What do you want to achieve? Keep it simple and clear!
I want to make an uppercut, which knocks both dummies and players upward into the sky.
What is the issue? Include screenshots / videos if possible!
When playtesting the script, it appears to work for the dummies, but when I boot up a local server and uppercut a player, nothing happens.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried searching on the DevForum, as well as trying LinearVelocity, but it doesn’t give results that I want. I’m trying to make an uppercut system like The Strongest Battlegrounds.
I believe it would be best for the impulse to be applied server-side. I don’t think it will work locally when you’re dealing with player-to-player interaction (if i understood correctly). Btw. about applying impulses on players in general, I think you might also want the hitted player to ragdoll before applying the impulse, as player controllers kind of stick to the ground unless they are affected by larger impulses
Yeah, it’s better to do it server-side. I made a local script, played the animations on the client, used :InvokeServer() then did damage on the server.
Edit: I put little force on the parameter for ApplyImpulse(), so I increased it,
-- before
Humanoid.Parent:WaitForChild("HumanoidRootPart"):ApplyImpulse(Vector3.new(0, 60, 0))
-- after
Humanoid.Parent:WaitForChild("HumanoidRootPart"):ApplyImpulse(Vector3.new(0, 1000, 0))
And it makes sense in a way to do damage on the server, because everyone should see that.
Yeah, before I was just using .Velocity which was deprecated. Only problem I have is that for like a second or two the dummy/player floats in the air like they’re Jesus or something rather than falling back down.
Are you setting the assembly linear velocity on the server or the client? The property isn’t replicated so setting that property on the server for an assembly that is owned by the client (ie the character) won’t have any effect. You would have to set the assemblylinearvelocity on the client
And the best thing u could do is to calculate the knockback on the server, for security reasons but also because you have full control.
And u could use client-sided codes to create a smooth animation and effects.
-- Set NetworkOwnership to server temporarily
player.Character.HumanoidRootPart:SetNetworkOwner(nil)
-- Knockback code
-- Return player to client ownership
player.Character.HumanoidRootPart:SetNetworkOwner(player)