RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make it when someone walks into the part they fall over and get knocked back a little bit"
-- script for part local part = script.Parent local function knockback(otherPart) local player = game.Players:FindFirstChild(otherPart.Parent.Name) if player then local character = player.Character local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.PlatformStand = true wait(0.1) humanoid.PlatformStand = false local knockbackDirection = (character.HumanoidRootPart.Position - part.Position).unit character.HumanoidRootPart:SetNetworkOwner(nil) character.HumanoidRootPart.Velocity = Vector3.new(knockbackDirection.X * 50, 5, knockbackDirection.Z * 50) wait(1) end end end part.Touched:Connect(knockback)