roby336
(Eternal)
September 7, 2022, 10:08pm
#1
I’ve been making a Zombie/Defense game recently. However, I’ve made many combat scripts, I can’t seem to match the way the player’s character moves when an attack is launched In other games, For example: BlackMagic 2.
If anyone has any good ideas on how I would effectively move a player’s character as if they were being propelled, Please let me know!
Katrist
(Katrist)
September 7, 2022, 10:25pm
#2
You can use :ApplyImpulse or LinearVelocity to propel a character effectively.
roby336
(Eternal)
September 7, 2022, 10:26pm
#3
I’ve used LinearVelocity, It seems to scrape against the ground when I do so. What does ApplyImpulse do?
Katrist
(Katrist)
September 7, 2022, 10:28pm
#4
:ApplyImpulse will as the name suggests, apply an impulse based on a Vector3.
https://developer.roblox.com/en-us/api-reference/function/BasePart/ApplyImpulse
I’m trying to make a throwable ball but it doesn’t really getting shot out. I want it to shoot out to the direction my HumanoidRootPart is facing. I’m trying to implement this using ApplyImpulse but I don’t really know how to use such thing. I’ve been to the wiki but I didn’t understand anything.
This is what I have so far:
Client:
local tool = script.Parent
local remoteEvent = tool.RemoteEvent
tool.Activated:Connect(function()
remoteEvent:FireServer()
end)
Server:
local tool = script.Par…
roby336
(Eternal)
September 7, 2022, 10:29pm
#5
Do you know if this would also scrape against the ground,“Which causes the character to not move at the same speed all the time”
Katrist
(Katrist)
September 7, 2022, 10:31pm
#6
You can just add a little up force (which will counteract the gravity) so that they glide along the ground.
Katrist
(Katrist)
September 7, 2022, 10:33pm
#7
Another thing you can do is just tween the position of the character but it would be a bit finnicky.
1 Like
roby336
(Eternal)
September 7, 2022, 10:33pm
#8
Okay, I see. I’ve been doing that currently. But do you know how I would for instance keep a player connected to another player with out actually connecting them?
roby336
(Eternal)
September 7, 2022, 10:36pm
#9
Thanks, Katrist. I’ll just keep testing out what looks the best since it doesn’t seem that there is a better way.