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

Why isn't this working?

Asked by
Relhem 5
8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

This use to work before, I've every script details the same, but it stop working for some reason.

Part = game.Workspace.Part

function onTouch()
    Part.Transparency = .5
    wait(3)
    Part.Transparency = 1
    wait(3)
    Part.Transparency = 0

end
script.Parent.Touched:Connect(onTouch)
--// In the future, please enter your code into a code block. To do so, press the blue button in the question editor, and insert your code between the lines.
0
Please insert you code into the lua block yoshi8080 445 — 8y

1 answer

Log in to vote
0
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
8 years ago

Change 'Connect' to 'connect'. The connect event is case sensitive.

Part = game.Workspace.Part

function onTouch()
    Part.Transparency = .5
    wait(3)
    Part.Transparency = 1
    wait(3)
    Part.Transparency = 0

end
script.Parent.Touched:connect(onTouch)

Hope this helped.

Ad

Answer this question