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

Expected identifier, got ____?

function onTouched()


	local model1 = game.ServerStorage."DeadArnold"
local model2 = workspace."Arnold"
model1.Parent = workspace."Arnold"
model2:Destroy()
end

in this case, it got DeadArnold. The script is supposed to remove "Arnold" and replace it with DeadArnold.

1 comment

0

In Lua, .something is the same as ["something"]. You're putting a string after the . and not text.

1 answer

What Phlegethon said

local function onTouched()
    local model1 = game.ServerStorage.DeadArnold
    local model2 = workspace.Arnold
    model1.Parent = workspace.Arnold
    model2:Destroy()
end

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