In my game players slide around while trying to knock each other off of a slippery platform with 0 friction defined in CustomPhysicalProperties in the properties window.
I want to have an ability which a player can use in order to not slip on the ground temporarily in order to gain an advantage over other players. Only the player who used the ability should be able to walk normally.
I tried having the ability script increasing the player’s HumanoidRootPart’s friction property and noticed it didn’t do anything. I tried the same with the feet and it didn’t work, but really I wasn’t expecting it to.
What can I do to increase a player’s friction with the ground, or increase the friction of the ground for only one player?
I solved this by creating a thin cylinder with the desired physical properties and setting it’s location to be under the player.
local hrp = _owner.Character.HumanoidRootPart
local iceDiskClone = self.IceDisk:Clone()
iceDiskClone.Position = hrp.Position
iceDiskClone.Parent = game.Workspace
local startTime = tick()
local yPosition = hrp.Position.y - (_owner.Character.Humanoid.HipHeight + 1)
local iceFlowUpdatePos = nil
iceFlowUpdatePos = RunService.Heartbeat:Connect(function()
if(tick() < startTime + self.Duration) then
iceDiskClone.Position = Vector3.new(hrp.Position.x, yPosition, hrp.Position.z)
else
iceDiskClone:Destroy()
iceFlowUpdatePos:Disconnect()
end
end)
Unfortunately with this solution other players can also use the disk under the player using the ability, though I’m sure this can be fixed using a collision group for each player and setting it so that only the player using the ability can collide with the moving cylinder.
Could you explain how do your script work ? I am wondering how to make only 1 player slippery too but because of the fact that I am a begginer, I’m encountering problem to understand your script.
Thank you
(So sorry, didn’t saw that the post was 2 years old, sorry for the bump)