#how to make A zone that removes brickwall (trowel Gear) from workspace

112 messages · Page 1 of 1 (latest)

past ocean
#

Hello!

#

Can you describe more of your pproblem that you are having?

real perch
#

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)

past ocean
#

Can you elaborate, I honestly ssaw no grammar, nor anything I can understand, elaborate, I can helpp you out, just elaborate.

#

OHHH

real perch
past ocean
#

maybe like from 10 seconds to 0 seconds?

real perch
#

Ye

past ocean
#

Is that what you mean?

#

Okay.

real perch
#

Yup

past ocean
#

Lemme type out the script.

real perch
#

Oh

#

Alright

#

Im just making A game with A few friends and needed a little help, so yeah lol.

past ocean
#

Lol.

#

BTW are you making a game so you need this script for mopping etc..?

real perch
#

Well

dusty swiftBOT
#

studio** You are now Level 1! **studio

real perch
#

Kewl

#

Bassicly

past ocean
#

Okay, can you send me a pic of the game?

real perch
#

Oh

#

Well

past ocean
#

I need to see if you have a zone

#

for the thing to cleenu.

#

cleenup*

real perch
#

Well

#

I didnt expect someone to help so fast

past ocean
#

just make like a hitbpox

real perch
#

Because im ready to sleep

past ocean
#

....

real perch
#

But ik how to make A hitbox

past ocean
#

no.

real perch
#

And insert a script innot

#

Innit*

past ocean
#

Just make a box around it and make it 1 transpeancy and name it Zone

dusty swiftBOT
#

studio** You are now Level 1! **studio

real perch
#

I know how to do that

past ocean
#

I sppelt that transperancy wrong.

real perch
#

Turn off collide

real perch
#

Dont worry

past ocean
#

yes just name it Zone and cancollide off and invisible [1 transparency]

real perch
#

Well

#

WAIT ONE OF MY FRIEND IS ONLINE

#

I could send the script to him

past ocean
#

Just make the hitbox and name it "zone" or "Zone"

#

PPlease

#

Please!

#

HELLO?

real perch
#

Told him that.

past ocean
#

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.

real perch
#

Alright

#

Thanks dide

past ocean
#

Np.

#

Need any help or if it didn't work just let me know.

real perch
#

Alright ill let youvknow

#

You know*

past ocean
#

So I can check my mistake inside that.

#

If it "didn't" work.

#

Alright, cya.

#

Bye!

real perch
#

Cya dud

past ocean
#

Cya

#

Bye!
Bye dude!

real perch
#

Yeah, bye lel

past ocean
#

Bye!

#

Also:

#

Please replace -- Reference to your brick wall with the appropriate reference to your brick wall in the brickWall variable.

real perch
#

Oh alright

past ocean
#

Alr, bye.

#

!

#

also

#

Do you have any experience in combat?

#

like Alpha's Planks - Arsenal, etc... ?

real perch
#

Oh

#

In Arsenal probably

#

Stopped playing Ina while tho

#

Ok so it indeed didnt work

dusty swiftBOT
#

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

real perch
#

And my friend explained why

past ocean
#

Can you make it more visible?

dusty swiftBOT
#

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

past ocean
#

All I see is the DM's that is all.

real perch
#

So bassicly

#

The brickwall appears when you use the trowel tool

past ocean
past ocean
#

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)
real perch
#

Alright, he is gonna test it out

#

Requick

past ocean
#

Okay.

#

Oh, you have a tool?

#

It won't work, let me make it so i is good with the toold.

real perch
#

Oh

#

Alright

past ocean
#

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)
real perch
#

Alright

past ocean
#

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]--
real perch
#

Alrighty

past ocean
#

Can we also 1v1 in a simular game like Arsenal?

#

It is famous: Alpha's Planks.

real perch
#

We could like

#

Tomorow i guess

#

So add Me to dms