Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I don't know how to fix the unknown statement, or what to use?

if script.Parent.onPartTouched(otherPart)
	then
	print(part.Name .. " has touched")
	end
 
	part.Touched:Connect(onPartTouched)

I want to make an if statement on a collision code. It saying that it is unknown on the "onPartTouched" and "otherPart" it is saying that it is unknown. I don't know how to fix that. Thanks!!!

1 answer

✓ Accepted answer

Collision is put simply: Simple What I spot that could fix this, is a function:

script.Parent.Touched:Connect(function(hit)
	local name = hit.Name
	print(name .. " has touched " .. script.Parent.Name)
end)

Hope that helps, if not feel free to reply.

This discussion is preserved as it was. New answers, comments, and votes are closed.