#how to make A zone that removes brickwall (trowel Gear) from workspace
112 messages · Page 1 of 1 (latest)
So like, the brickwall from the trowel tool has the clean up script, so what i need help with is how to make A zone (A script bassicly) that changes the clean up Time of the brickwall to 0 seconds. (Bassicly immediately)
Can you elaborate, I honestly ssaw no grammar, nor anything I can understand, elaborate, I can helpp you out, just elaborate.
OHHH

maybe like from 10 seconds to 0 seconds?
Ye
Yup
Lemme type out the script.
Oh
Alright
Im just making A game with A few friends and needed a little help, so yeah lol.
Well
** You are now Level 1! **
Okay, can you send me a pic of the game?
just make like a hitbpox
Because im ready to sleep
....
But ik how to make A hitbox
no.
Just make a box around it and make it 1 transpeancy and name it Zone
** You are now Level 1! **
I know how to do that
I sppelt that transperancy wrong.
Turn off collide
yes just name it Zone and cancollide off and invisible [1 transparency]
Told him that.
Okay.
Now make a script inside of the hitbox
And inside the script you do:
local zone = script.Parent
local brickWall = -- Reference to your brick wall
local transitionTime = 1 -- Adjust the duration of the transition
zone.Touched:Connect(function(part)
if part:IsDescendantOf(brickWall) then
-- Calculate the time interval for the transition
local timeInterval = transitionTime / 6
-- Decrease the cleanup time gradually with a loop
for i = 6, 0, -1 do
brickWall.Cleanup.Time = i
wait(timeInterval)
end
-- Set the cleanup time to 0 for immediate effect
brickWall.Cleanup.Time = 0
end
end)
Thats it, it should work.
Cya dud
Yeah, bye lel
Bye!
Also:
Please replace -- Reference to your brick wall with the appropriate reference to your brick wall in the brickWall variable.
Oh alright
Alr, bye.
!
also
Do you have any experience in combat?
like Alpha's Planks - Arsenal, etc... ?
** You are now Level 2! **
Can you make it more visible?
** You are now Level 2! **
All I see is the DM's that is all.
Okay, I want to 1v1 PVPP you.
Ehm..
So try this: this has a higher chance on working, since I double-checked my code.
-- Assuming you have a reference to the brickwall object
local brickwall = --[[ Reference to the brickwall ]]
-- Function to change the cleanup time of the brickwall to 0 seconds
local function changeCleanupTime()
brickwall.CleanupTime = 0
end
-- Function to listen for players entering the zone
local function onPlayerEnteredZone(player)
changeCleanupTime()
end
-- Function to listen for players leaving the zone
local function onPlayerLeftZone(player)
-- Optionally, you can reset the cleanup time back to 6 seconds when the player leaves the zone
brickwall.CleanupTime = 6
end
-- Assuming you have a zone object named "Zone" in your game
Zone.PlayerEntered:Connect(onPlayerEnteredZone)
Zone.PlayerLeft:Connect(onPlayerLeftZone)
Okay.
Oh, you have a tool?
It won't work, let me make it so i is good with the toold.
Here you go:
-- Reference to the zone object
local zone = --[[ Reference to the zone ]]
-- Reference to the brickwall object within the zone
local brickwall = --[[ Reference to the brickwall ]]
-- Function to change the cleanup time of the brickwall to 0 seconds
local function changeCleanupTime()
brickwall.CleanupTime = 0
end
-- Function to listen for the trowel tool touching the brickwall
local function onTrowelTouch(part)
if part:IsDescendantOf(brickwall) then
changeCleanupTime()
end
end
-- Connect the function to the Touched event of the trowel tool
trowelTool.Touched:Connect(onTrowelTouch)
Alright
Please replace:
Reference to the zone with
script.Parent
and the Reference to the Brickwall with
script.Parent.Parent --[Because the hitbox is originally in the Brickwall, therefore script>Parent>Parent]--
Alrighty