FF = script.Parent function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil) then for loop = 1, 100 do FF.CFrame = FF. CFrame *CFrame Position(0, 50, 0) wait(1/25) end end script.Parent.Touched:connect(onTouched)
I don't know how to do it. The Overview says that Touched is not a valid member of workspace. I just don't understand.
In your script you put this FF.CFrame = FF. CFrame *CFrame Position(0, 50, 0) you need to put CFrame.new not CFrame Position and even if you did add CFrame Position it would CFrame.Position and you also forgot an end. To make the brick move forward you must use the z axiz (X,Y,Z) the x axis move the brick left and right the y axis moves the part up and the z axis moves the brick back and forwards.
FF = script.Parent function onTouched(hit) local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil) then for loop = 1, 100 do FF.CFrame = FF. CFrame *CFrame.new(0, 0, 50) --z axis moves it forward. wait(1/25) end end end script.Parent.Touched:connect(onTouched)
The only thing that I could think of that could be affecting this is that the script should be inside the brick. Otherwise it looks perfectly fine.