Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a brick go transparent when i step on it?

Asked by 10 years ago

brick = script.Parent

function turnGhostly() brick.Transparency = 0.5 end

brick.Touched:connect (turnGhostly)

2 answers

Log in to vote
1
Answered by
IcyEvil 260 Moderation Voter
10 years ago

Alright I am rescripting that Entirely.

function onTouched(hit)
    brick = script.Parent
brick.Transparency = ("0.6")
wait(3.0)
brick.Transparency = ("0.20")
wait(3.0)
brick.Transparency = ("0.40")
wait(3.0)
brick.Transparency = ("0.80")
wait(3.0)
brick.Transparency = ("1.0")
wait(3.0)
end
script.Parent.touched:connect(onTouched)

After 3 seconds it continues to go invisible Making it Ghost Like than It ends and Restarts. ( Have to insert this into a Brick )

0
Thanks! This totally works! P.S iluvmaths1123 198 — 10y
0
No Problem IcyEvil 260 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

-- I'm not too sure if this'll work

brick = script.Parent
debounce = true
function turnGhostly()
if debounce then
decounce = false
brick.Transparency = 0.5

wait(2)
brick.Transparency = 0
debounce = true
end
end

brick.Touched:connect (turnGhostly)

Answer this question