#Removable boards
1 messages · Page 1 of 1 (latest)
More context pls whats a hammer tool
if you're looking for the simple way, make a hitbox and destroy the board if it's hit
like a gear,
like a gear thats a hammer that if it hits the boards, they will break
Do you have an animation that swings the tool already? I can send you a script all you need to do it insert the animationID and it should work
Unfortunately no, im really new to roblox studio and dont know how to do stuff like that
well im trying to figure out how to get the animationID once i do i can publish this aniamtion to roblox its a standard tool swing you move your hand down than back up I can add more detail need be. But I can send the script in the mean time.
Wait do you have the tool made?
So what you want to do it the board you want breakable click it in the explore tab, than scroll all the way down until you find tags, than put "Breakable" just like that in the tag section.
Than go to you hammer tool add a local script. Inset this into it.
local tool = script.Parent
local CollectionService = game:GetService("CollectionService")
tool.Activated:Connect(function()
local character = tool.Parent
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
if not humanoid then return end
local rootPart = character:FindFirstChild("HumanoidRootPart")
if not rootPart then return end
local origin = rootPart.Position
local direction = rootPart.CFrame.LookVector * 5
local rayParams = RaycastParams.new()
rayParams.FilterDescendantsInstances = {character}
rayParams.FilterType = Enum.RaycastFilterType.Blacklist
local result = workspace:Raycast(origin, direction, rayParams)
if result and result.Instance then
local hitPart = result.Instance
if CollectionService:HasTag(hitPart, "Breakable") then
hitPart:Destroy()
end
end
end)
thank you
** You are now Level 1! **
@deep meadow i dont believe you need an animation to test this due to it still notices you clicking without it
so aslong as your hammer tool is in starterpack with a handle you should be good
Stop spoonfeeding
well same time unless they study LUA they wont ever get the answer they want they can be told what to do but itll never work and itll be a failed project. I feel if im able to do anything little theirs a small chance I helped a sucsessful game on roblox. But now if they asked for a whole project to be done i wouldnt do that free. But small little task im fine with doing.
Also have you tested it and did it work? im curious bc tbh never really attempted something like this
This channel has a policy of no writing scripts for anybody, dispobeying this in a form of doing it anyway is called spoonfeeding.
And youre not helping by giving them exactly what they need here
oh didnt know their was rules against it
Theyll just copypaste and never learn hos to reslove the issue if it happens again in a different context
well theirs another feed i sent someone a code... I genunily didnt think there was anything against it.
All youre doing is breaking the rules and giving up ur energy to do so, for there is nobreward
Just dont do ot again
hey, mind checking what I sent you?