This is a simplified, community-compiled documentation for Gorilla Tag custom map Luau scripting. All logic must be written in Luau and assigned via the Custom Gamemode TextAsset field in Unity.
function OnGameStart()
function OnGameStart() print("Game has started!") end
function OnGameEnd()
function OnGameEnd() print("Game over!") end
function tick(dt)
function tick(dt) timer = timer + dt if timer > 5 then print("5 seconds passed!") timer = 0 end end
function OnPlayerJoin(player)
function OnPlayerJoin(player) player:SendMessage("Welcome, " .. player.name .. "!") end
function OnPlayerTagged(victim, tagger)
function OnPlayerTagged(victim, tagger) tagger:SendMessage("You tagged someone!") end
emitEvent(tag: string, data: table)
emitEvent("buttonPressed", { who = player.name })
function onEvent(tag, data)
emitEvent
or triggered by map interactions.function onEvent(tag, data) if tag == "buttonPressed" then print(data.who .. " pressed a button") end end
player:SendMessage(text: string)
player:SendMessage("You got a point!")
player.position
if player.position.y > 10 then player:SendMessage("You climbed high!") end
findGameObject(name: string)
local obj = findGameObject("FloppaButton") if obj then obj:setVisibility(false) end
gameObject:setVisibility(true/false)
gameObject:setVisibility(true)
gameObject:setCollision(true/false)
gameObject:setCollision(false)
playSound(index: number, position: Vector3, volume: number)
playSound(1, player.position, 1.0)
onEvent("touchedGameObject", {player, gameObject})
function onEvent(tag, data) if tag == "touchedGameObject" then data.player:SendMessage("You touched " .. data.gameObject.name) end end
print(...)
to log info to the Unity console/logcat.tick
for time logic like hunger, cooldowns, or auto-income.