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

How do I make a brick that flings a character? (SOLVED)

I have tried a script but it only makes the character sit, here is the code

script.Parent.Touched:connect(function(Touch)
local Humanoid = Touch.Parent:FindFirstChild("Humanoid")
local Head = Touch.Parent.PrimaryPart
if Humanoid and Head then
Humanoid.Sit = true
local vel = Vector3.new(math.random(200, 200), math.random(200, 200), math.random(200, 200))
Head.Velocity = rel
Head.RotVelocity = rel
end
end)

Is there a way to fix it up so it actually flings them? Or do I need a whole other code.

1 answer

✓ Accepted answer

Simple You Just Made Mistakes.

Try This:

script.Parent.Touched:connect(function(Touch)
local Humanoid = Touch.Parent:FindFirstChild("Humanoid")
local Head = Touch.Parent.PrimaryPart
if Humanoid and Head then
Humanoid.Sit = true
local vel = Vector3.new(math.random(200, 200), math.random(200, 200), math.random(200, 200))
Head.Velocity = vel
Head.RotVelocity = vel
end
end)

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