Can't require script (SOLVED)

I added module and did it as in example https://github.com/britzl/publicexamples/blob/master/examples/click_game_object/click_game_object/click_game_object.script but in doesn’t work? what i need to do?


image

local goput = require "main.goput"

image

You are using a GameObject script (.script) as a Lua module (.lua).

Just rename the file goput.script to goput.lua on disk.

2 Likes

yeah, my bad. I found it. Th

1 Like