#Disappearing part script not working

38 messages · Page 1 of 1 (latest)

silver zephyr
#

local Hexagon = script.Parent
local db = true
local setting = game.Workspace.Hexagon.Settings
local waitTime = setting.FadeTime
local amount = setting.FadeAmount

Hexagon.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
if humanoid and db == true then
db= false
wait(0.3)
while db == false do
Hexagon.Transparency += amount.Value
wait(waitTime.Value)
if Hexagon.Transparency >=1 then
db = true
Hexagon.CanCollide = false
end
end
end
end)

while true do
wait()
if setting.Resetting.Value == 2 then
Hexagon.Transparency = 1
Hexagon.CanCollide = false
wait(3)
Hexagon.Transparency = 0
Hexagon.CanCollide = true
end
end

#

heres the script

#

please help!

delicate lion
#

did you write this script

delicate lion
#

do you have all these??

silver zephyr
#

Ohh

#

No I don’t

#

My friend gave me the script

#

Never specified

delicate lion
#

do you want me to explain

#

or u understand now

silver zephyr
#

All good

#

Thanks

silver zephyr
# delicate lion

dont mean to bother you but you mind telling me how to add the things to the settings

wet oasisBOT
#

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

delicate lion
#

ok so do u undersyand what those things r

#

@silver zephyr

silver zephyr
#

not rly

#

i just started coding games

delicate lion
#

first you want to make a folder inside the part

#

then you want to add integer value

#

name everything to what i showed in the picture

#

and then in the properties of the int value change the value of everything to 2

#

and the script should work

#

the int value is basically just a object that holds a number

silver zephyr
#

aalr

#

doing it now

#

this correct?

delicate lion
#

@silver zephyr ues

#

yes

#

then set everything’s value to 2

#

and the script should work

silver zephyr
#

its not disseapearing

#

the script correct

delicate lion
#

change local setting to