local part = game.Workspace.Part
if part.Touched:Connect(function() then
print("Hello")
end)
syntax error please help me fix
local part = game.Workspace.Part
if part.Touched:Connect(function() then
print("Hello")
end)
syntax error please help me fix
if part.Touched:Connect(function() then
that's the error: you used 'if then' and ':connect()' in eachother. events work like this:
Instance.Event:connect(function(inputsIfAnyAreNeeded,input2IfNeeded)
-- code
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
delete if and then
You need to understand how events work https://developer.roblox.com/en-us/articles/events