#How can I make a punch that breaks certain parts with like a book value

148 messages · Page 1 of 1 (latest)

visual hinge
#

i meant boolvalue but im sure yk what I ment

rigid gust
#

hmm

visual hinge
#

i also have no scripting experience so it would be nice if you could show me, if you do manage to cook up something.

last micaBOT
#

studio** You are now Level 2! **studio

rigid gust
#

so basically

#

I'm a scripter for 8 years so dw.

#

U want the script or instructions?

visual hinge
#

uhh cani have both

rigid gust
#

sure

visual hinge
#

lIke instructions of where to put the things

rigid gust
#

So basically

#

Add a BoolValue inside the part u want to be breakable

visual hinge
#

yep

rigid gust
#

then name it anything u want such as "Break Punch" ur choice

#

And set it true

#

For the parts that should break

visual hinge
#

bUt how can I make the punch?

rigid gust
#

u need first a tool

#

Then an animation

#

Then A Hit detection system

visual hinge
#

oh

#

oh boy

#

welp

rigid gust
#

Or

visual hinge
#

rip me 💀

rigid gust
#

Open roblox studio

#

Then

#

Ill tell u dw

#

Follow my instructions

visual hinge
#

wait uhh

#

a out that

rigid gust
#

Ill tell u rn

#

Open roblox studio

#

And go to starterpack in the Explorer

#

Right click

#

The starterpack

#

Then insert a tool

#

Before that select an objeft

#

Object

visual hinge
#

can I make it a certain button to use the tool?

#

lIke f?

#

llikeIke f to punch?

rigid gust
#

Yea u can if u want

#

U want the

#

Instructions?

visual hinge
#

yes please

rigid gust
#

Before that

#

Lets continue on the steps

visual hinge
#

alr

rigid gust
#

Have u already insterted a tool

#

From the starterpack?

visual hinge
#

uhh I cant rn

#

im not home

rigid gust
#

No worries

#

Follow my steps

visual hinge
#

i can send you the project files

rigid gust
#

When u right click the starterpack select an object then u will see tools

rigid gust
visual hinge
#

oh aight

rigid gust
#

Rename the tool into

#

Rename the tool

#

"Punchtool"

#

Inside the tool add a local script

#

And animation

#

Then

#

Open the animation editorevilcat

#

View the animation editor

#

Select ur character r15

visual hinge
#

wait

rigid gust
#

Click create a new animation

visual hinge
#

my game is r6

rigid gust
#

And rename it punch

rigid gust
rigid gust
#

Animate the

#

Arm movement for a punch motion

#

Save and upload it to roblox.

#

Copy the animation id

#

From the website

#

Then

#

We move on into scripting

#

this will take 10mins

#

ill script one min

visual hinge
#

dang💀

rigid gust
#

i got this dw

#

been scripting almost for a decade

#

im basically an expert

visual hinge
#

thanks dawg

rigid gust
#

Let me now

#

script

rigid gust
#

ok done

#

help

#

one min

loud beacon
#

hold up this game kinda fire

rigid gust
#

Heres the script

last micaBOT
#

studio** You are now Level 8! **studio

rigid gust
#

@visual hinge

#

After u have copied the animation id insert it inside the script

#

And heres the punch script

#

Wasted my time bruh

visual hinge
#

Ehh

#

Sorry I had to do smn

#

@rigid gust

last micaBOT
#

studio** You are now Level 3! **studio

rigid gust
#

Can u explain again

#

What u need

visual hinge
#

Uhh can’t I have the script please? If your done?

rigid gust
#

local tool = script.Parent
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:FindFirstChildOfClass("Humanoid")

tool.Activated:Connect(function()
local punchOrigin = char.HumanoidRootPart.Position
local punchDirection = char.HumanoidRootPart.CFrame.LookVector

local ray = Ray.new(punchOrigin, punchDirection * 5)  
local hit, position = workspace:FindPartOnRay(ray, char)  

if hit and hit.Parent then  
    local enemyHumanoid = hit.Parent:FindFirstChildOfClass("Humanoid")  
    if enemyHumanoid then  
        enemyHumanoid:TakeDamage(10)  
    end  
end  

end)

#

Paste the animation id inside the script

#

If u followed my steps scrollup

visual hinge
#

Aight thanks bro

rigid gust
#

What u need next

#

An f button?

visual hinge
#

To make the button to punch be the f key yes please

rigid gust
#

okat

#

Okay

#

So

#

Open roblox studio

#

In the explorer window

#

Locate startergui

#

Add a screengui

#

Right click in startergui and insert a screengui

visual hinge
#

Is this for mobile?

rigid gust
#

No

visual hinge
#

Oh Alr

rigid gust
#

On pc

#

Or u want the keybind

#

Only

#

Like f

#

?

#

@visual hinge

#

I got confused

visual hinge
#

Like yk if you have or haven’t idk played my game, yk how if you press ctrl you crouch, and shift to run, well I would like f to punch

rigid gust
#

@visual hinge

visual hinge
#

?

rigid gust
#

Reply

visual hinge
#

Wdym reply?

#

Like what key bind?

visual hinge
visual hinge
#

im back home now i can do the script

#

also tysm foir helping me @rigid gust

#

i really appreciate it