3 years ago

here. a script for pushing others.


local player = game.Players.LocalPlayer

local character = player.Character

local humanoid = character:WaitForChild("Humanoid")

-- Create a "Touch" event for the character's HumanoidRootPart

humanoid.RootPart.Touched:Connect(function(hit)

-- Check if the character is colliding with another player

local targetPlayer = game.Players:GetPlayerFromCharacter(hit.Parent)

if targetPlayer then

-- Apply a force to the other player's character to push it

local force = (hit.Position - character.HumanoidRootPart.Position).unit * 50

hit.Parent:FindFirstChildOfClass("Humanoid"):AddForce(force)

end

end)



4 comments

Loading...

Next up

when the different emotions meet :

(this literally is my emotions)

it's been a while, hasn't it?

100 y/o vampire laughs over a construction object

#IPlayedRuin i can multi-task using a snipping tool

"Talk to myself"

first time making pixel art with paint.net

thanks dont forget files for the template

Look down.

Nothing in this line.

Swapped Just!404

Just updated my iPad and I need a new background and a drawing for one widget, yes I'm still going crazy over gasa4

THERES LORE BRO. LOREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.