Ah yeah sorry. replace all instances of .Scene with .CharacterScene.
I'm never too sure what will work or not off the top of my head when it comes to shorthand Lua. Sometimes it works when you crop out most of name.
For instance if I want to access / update a character's position, then I only need to type .Position instead of .CharacterPosition or VCharacterPosition.
It's a bit strange like that.
local pos
function setCharacterShadow()
if Characters["shadow"].CharacterScene:getName() ~= game.CurrentCharacter.CharacterScene:getName() then Characters["shadow"].CharacterScene = game.CurrentCharacter.CharacterScene end
if game.CurrentScene:getName() == game.CurrentCharacter.CharacterScene:getName() and game.CurrentScene:getName() == Characters["shadow"].CharacterScene:getName() then
pos = game.CurrentCharacter.Position
Characters["shadow"].Position = { x = pos.x, y = (pos.y - 10) }
end
end
registerEventHandler("mainLoop", "setCharacterShadow")