Part.Velocity not working

Hello, I’m trying to apply an upward velocity (0, 100, 0) to a part when I press the keyboard button E. I do this on the client, however, it seems like the part is attached to the baseplate, even though all surfaces are smooth and the part is not anchored. The velocity I apply shows in the properties, but it doesn’t actually fly into the sky. I have no idea how to fix this.

Here’s the code:

UIS.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.Keyboard then
		if input.KeyCode == Enum.KeyCode.E then
			workspace.Part.Velocity = Vector3.new(0, 1000, 0)
		end
	end
end)

Any help is appreciated :grin:, thanks.

2 Likes

Hi, you just need to add *10 to 4 line and it will work

I replicated this in my own game and it flies into the sky? Try removing the part and just inserting another one w/out changing anything.

I changed velocity to 100 so it doesn’t instantly disappear.

make sure to remove welds and unanchor

1 Like

Yeah but I don’t want that much power

It didn’t work, however, you gave me an idea to just insert the part using a script. That worked :thinking:

It’s most likely from plugins or some other script that’s changing your parts properties.

These are the only plugins I have currently, I don’t see why they should cause problems…

Plugins

under home or model tab make sure join surfaces is off and reinsert part

It is off, and the part is not anchored.

for index,object in pairs(workspace.Part:GetChildren()) do
if object:IsA('Weld') then object:Destroy() end
end

run this in your command bar (under view tab)

Can you possibly send a video of you pressing E?

I think you typed 1000 instead of 100.
You said you have the velocity of (0, 100, 0) but you typed Vector3.new(0, 1000, 0) in the script.

Also you can disable join surfaces and remove all welds from the brick. If either one does not work consider using bodymovers.
Try creating a new part and see if it works. You could have messed up some properties of the part.

The velocity doesn’t update probably because the client isn’t the network owner of that part. Only the network owner can change a part’s velocity so this can be fixed by making the client the network owner with BasePart:SetNetworkOwner(player) and then launching the part on the client.

4 Likes

I think u need use “BodyVelocity” thing, that’s better to use than just velocity because that’s works without any errors how i know

Okay, after a lot of research, I’ve found that it’s most likely some kind of thing that Roblox built into their game to increase performance. When I go close to the part, I can press E and make it “fly” into the air, however, when I am far away, I cannot do this :man_facepalming:. Thank you for your help and feedback.

are you sure about that sssssss

Well, I see no reason why else it would only jump into the air when I was closer to it (not touching it). If you have a different reason, please tell me.

I know its a bit to late to reply, but It does that because the part network ownership is set to Nil.

1 Like