1 | local part = game.Workspace.Part |
2 |
3 | if part.Touched:Connect( function () then |
4 | print ( "Hello" ) |
5 | end ) |
syntax error please help me fix
1 | if part.Touched:Connect( function () then |
that's the error: you used 'if then' and ':connect()' in eachother. events work like this:
1 | Instance.Event:connect( function (inputsIfAnyAreNeeded,input 2 IfNeeded) |
2 | -- code |
3 | end ) |