Part keeps flinging the player when jumping onto it?

I have this weird issue with my parts where when a player tries to jump on them or near them they get pushed back and I’m not sure what causes this to happen I have nothing in my code or in the part that would seem to cause this unless it’s some kind of property? (it could very well be the way I coded the part to work, but I have no idea what in my code could cause this)

All of the parts include the same thing a mesh, fire effect, touch interest, values, but I’ve had this issue since I’ve started working on my game and included all these things I even tried deleting everything in the part to see if it was something in it, but nothing so I don’t think it’s the part that causing this which again could mean it’s something in my code.

Here’s a gif of it

2 Likes

Happened to me as well but what I did is go to the part’s property and tick massless.

1 Like

Hmm I’ve tried messing with this before, but it seems to make the part just fall

I have this bit of code which makes the part follow the player (sorry about testthing I have to update that) but as soon as I enable massless for the part it just falls through the player, through the baseplate and it’s gone lol even though I have this code which should make the part follow the player

		coroutine.resume(coroutine.create(function()
    		while wait() do
				if testthing == "Doug" then
					bp.Position = character.Head.Position + Vector3.new(0,5,0) --Because Dougs hat is just to L 0 N G 
				elseif testthing == "CaptainHat" then
					bp.Position = character.Head.Position + Vector3.new(0,1.4,0) --Because Captains Hat Hat clips through his head slighty
				elseif testthing == "Birthday" then
					bp.Position = character.Head.Position + Vector3.new(0,1.4,0) --Same thing happens as Captain Hat
				else
					bp.Position = character.Head.Position + Vector3.new(0,1,0)
				end
    		end      
		end))  

Do you know about this same bug that happens with some vehicles, or more popularly, the Pinewoods Trains?

Make sure that the part is not inside the character model, or this flinging can happen.

Ah yeah ok that seems fix the problem, but this is gonna be a issue with the way I have coded my game so far because all the players are gonna have this hat part inside them and I use character:FindFirstChild(“Hat”) a lot to get there hat and do stuff with it, but if I put the hat in the workspace and there’s 2 players my code doesn’t have a way to see who the hat belongs to and do the different things for if that makes sense?

Anyways thanks I’ll see if I can change my code to get this to work now lol

I know the struggle.
I usually don’t plan in detail what I am going to do when I script, and I have to constantly change stuff from older parts of a script/scripts so they work with a better idea that came in my mind.

Don’t forget about the holy CTRL + H combination, and the “Replace all” feature of that combination.

2 Likes

I’d like to ask if there is a workaround to fixing the problem without having to redo a lot of the current code? Or is the only way going to be to move the part out of the character.

edit: nvm I figured out how to get it t work without making a lot of changes to the code! thanks for the help :slight_smile: