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

What is wrong with this? (I got it. Thank you a lot for the answers, Master Scripters :D)

Asked by
Yeevivor4 155
10 years ago
local ff = script.Parent
local db = true
ff.Touched:connect(function(hit)) -- There needed to be an extra ')'.
 end
 if hit.Parent:findFirstChild("Humanoid") and db then
       db = false
       for loop = 1, 100 do
        ff.CFrame = ff.CFrame + Vector3.new(0,0,1)
      wait(.1)
      db = true
     end

The Output Window says

Workspace.FF.Script:5: ')' expected (to close '(' at line 3) near 'if'

1 answer

Log in to vote
2
Answered by 10 years ago
local ff = script.Parent
local db = true ff.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") and db then db = false 
for loop = 1, 100 do 
ff.CFrame = ff.CFrame + Vector3.new(0,0,1) 
wait(.1) 
db = true 
end 
end) 

There you go, you didn't have a parenthesis and you had an end right at the beginning.

Ad

Answer this question