Set x position to variable naame

i have a variable called spawn
it is set to spawn+ ToString(3)
//for testing purposes

ii have a sprite called fire

i am trying to do fire x position set = spawn.X()
this way if it was spawn 1 2 3 4or 5 it will spawn at one of these places

its not accepting rand.X() is there something im missing?

fire x position = Variable(spawn)

Try with: Variable(spawn[“X”])

Thanks but no go with both of them

i would;ve thought the below would workbut it just doesnt accept the variable

if i physically type spawn3.X() it works but if i put a variable with that value it doesnt read it


fire x position = fire.X()+ RandomInRange(0, 5)

if yuo would the fire move in the game move the condition out to beginning scene