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

Does the placement of "end" affect your script?

Asked by 6 years ago

The thing is I've made a streetlight script I tried two times the first I put the end in another line the other try I put end somewhere else and it worked so yeah

0
Just be careful that it doen't get confusing. <-> TheeDeathCaster 2368 — 6y

1 answer

Log in to vote
0
Answered by
ax_gold 360 Moderation Voter
6 years ago

as long as you have the right amount of ends, and end) isnt mixed up with end. For example:

bleh = true

script.Parent.Touched:connect(function(hit)
    hit:Destroy()
    if bleh = true then
        bleh = false
    end)
end

this would return an error, because end) and end are swapped.

Ad

Answer this question