Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is There a Way to Stop All Forces on a Player?

And can I do it without anchoring a bodypart?

2 comments

0

You can use: BodyVelocity

0

Or changing the walkspeed to 0 OR Use BodyPosition

1 answer

You can make the player CanCollide to false by using the following script:

script.Parent = game:GetService("ServerScriptService")
local PhysService = game:GetService("PhysicsService")
local PlayerGroup = PhysService:CreateCollisionGroup("p")
PhysService:CollisionGroupSetCollidable("p","p",false)

function NoCollide(model)
	for k,v in pairs(model:GetChildren()) do
		if v:IsA"BasePart" then
			PhysService:SetPartCollisionGroup(v,"p")
		end
	end
end

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(char)
		char:WaitForChild("HumanoidRootPart")
		char:WaitForChild("Head")
		char:WaitForChild("Humanoid")
		wait(0.1)
		NoCollide(char)
	end)
	
	if player.Character then
		NoCollide(player.Character)
	end
end)

This isn't a script requesting website so please give us what you already have so we can help you better

2 comments

0

I never really asked for a script. I just asked a question.

0

well...

This discussion is preserved as it was. New answers, comments, and votes are closed.