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

Why won't the part turn transparent once touched?

Asked by 9 years ago
function OnTouch ()
script.Parent.Parent.Spotty.Transparency=0
end

I know I'm going to get some thumbs down... just please help me ;(

2 answers

Log in to vote
1
Answered by
woodengop 1134 Moderation Voter
9 years ago

You don't have a Connection line.

function OnTouch ()
    script.Parent.Parent.Spotty.Transparency=0
end
PartName.Touched:connect(OnTouch)

or

PartName.Touched:connect(function()
    script.Parent.Parent.Spotty.Transparency=0
end)
0
Thanks! iiCasual 20 — 9y
0
and btw, it was supposed to be; iiCasual 20 — 9y
Ad
Log in to vote
0
Answered by 9 years ago
PartName= workspace.Model3.Spotty
PartName.Touched:connect(function()
    script.Parent.Parent.Spotty.Transparency=1
end)

@TheContinentofEurope Thanks! (again)

Answer this question