Is it possible to do this?

Is it possible to have a part that doesn’t move when a player hits it? The part is control by a vector force.

The main goal: I want to be able to hit part. The part will not move. But the part will be unanchored.


This is want I don’t want. ^

Here is some code:

script.Parent.Force = Vector3.new(0, workspace.Gravity * script.Parent.Parent:GetMass(), 0)

All help is appreciated.

Hmm… there’s probably better ways to do what you actually want. If you say what your end goal is we can help you find a better approach.

That being said…

You could turn off CanCollide for the un-anchored part (or at least change its collision group to not interact with the player), and make it invisible.

Then, have a CanCollide=true (it could only interact with the player if you wanted) and Anchored part that acts as the visuals. Update its cframe to match the unanchored one:

local visual = workspace.TheAnchoredPart
local physical = workspace.TheUnanchoredPartThatsInvisible
game:GetService("RunService").Heartbeat:Connect(function()
    visual.CFrame = physical.CFrame
end)

If you have a better end goal or a better approach then you can mention it.

I think you misunderstood me.

I’m asking what your end goal is. Why do you want to do this in the first place?

http://xyproblem.info/

I have a helicopter that I am working on. I am struggling with making the helicopter go up and down. I figured it was because of the character’s mass.

Ah, that’s a much better question :slight_smile:

Have you considered using a different type of body mover? A BodyPosition/BodyVelocity + BodyGyro/BodyAngularVelocity seems like it would be better suited for a helicopter.

People have told me those are bad to use and to use vector forces because those are legacy forces.

How about alignposition and alignorientation then? They aren’t legacy body movers. When using them you can have one attachment parented to the part and another attachment parented to terrain, for example. The CFrame of terrain is the origin of the world, so when you set the CFrame of the attachment parented to terrain, it’ll be set in world space.

I solved the problem. I used body position and body gyro with low d and high p.