I made a function, but got an ‘expected identifier when parsing expression, got ‘=” error

  Kiến thức lập trình
clickdetector = script.Parent.ClickDetector
newPart = Instance.new('Part', workspace)
newPart:Destroy()
function createPushBlock():
    newPart = newPart
    newPart.BrickColor = 'Neon orange'
end

clickdetector.MouseClick:Connect(createPushBlock())

I tried to search information in devforum, but i didn’t find a useful solution

I expected it to spawn a new part once part is clicked

New contributor

s_ecialkai is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT