Hello, I have come across something called 'Beam Clashing' in Dragon Ball Final Adventures. I want to replicate it myself, but have no idea how to do so.
I have wrote up a script that creates a Part that will move forwards from the torso's position using BodyVelocity, what I want to know is how I make a 'clash'.
How to win a Beam Clash? I plan to make it so that the one who mashes a certain button on the Keyboard more wins.
I have tried experimenting with the clash, but I didn't get far.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
function beam(key)
if key == 'j' then
b = Instance.new("Part",game.Workspace)
b.CanCollide = false
b.CFrame = player.Character.Torso.CFrame*CFrame.new(0,0,-3)
bv = Instance.new('BodyVelocity',b)
bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.velocity = player.Character.Torso.CFrame.lookVector*40
end
end
mouse.KeyDown:connect(beam)
I'm not sure if this complies with this Site's rules, but I hope so. I would appreciate as much help as I can get.

2 comments
b.CanCollide = true, also use UserInputService.InputBegan, not KeyDown.
^ how do you use UserInputService