Title says all, here’s the script that goes inside of the part I want to be invisible:
local gravel = script.Parent
local function PlayerTouched(gravel)
gravel.Transparency = 0.1
wait(0.2)
gravel.Transparency = 0.3
wait(0.2)
gravel.Transparency = 0.5
wait(0.2)
gravel.Transparency = 0.7
wait(0.2)
gravel.Transparency = 1
end
gravel.Touched:connect(PlayerTouched)
1 Like
regexman
(reg)
#2
Because you defined gravel twice, try this
local gravesl = script.Parent
local function PlayerTouched(gravel)
gravel.Transparency = 0.1
wait(0.2)
gravel.Transparency = 0.3
wait(0.2)
gravel.Transparency = 0.5
wait(0.2)
gravel.Transparency = 0.7
wait(0.2)
gravel.Transparency = 1
end
gravesl.Touched:connect(PlayerTouched)
1 Like
try this
local gravel = script.Parent
local function PlayerTouched()
gravel.Transparency = 0.1
wait(0.2)
gravel.Transparency = 0.3
wait(0.2)
gravel.Transparency = 0.5
wait(0.2)
gravel.Transparency = 0.7
wait(0.2)
gravel.Transparency = 1
end
gravel.Touched:connect(PlayerTouched)
basically remove the parameter because that looks out for the part that touched it
3 Likes
That fixed the problem, thanks for your help!