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

Clashing, how do I make this happen?

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

1

b.CanCollide = true, also use UserInputService.InputBegan, not KeyDown.

0

^ how do you use UserInputService

1 answer

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