#Need help with currency script.

48 messages · Page 1 of 1 (latest)

stuck flame
#
local previousParent = obj.Parent
local previousPosition = obj.Position
local newObj = obj:Clone() -- obj replacement

obj:Destroy()
task.wait(10)

newObj.Position = previousPosition
newObj.Parent = previousParent
#

you cant just paste into your code so edit it a bit

#

but you get the idea

#

this is only for the obj respawn though

hard dew
#

ok

#

that would create a clone which would take the position of the og coin

hard dew
#

like that font and all

stuck flame
hard dew
#

oh

#

ok

#

thx

hard dew
#

@stuck flame local previousParent = obj.Parent is showing up as an error

#

its being underlined in blue

stuck flame
#

Tell me what it says

hard dew
#

it doesnt say anything

snow saddleBOT
#

studio** You are now Level 2! **studio

hard dew
#

but the code gets underlined in blue

#

the obj part

hard dew
stuck flame
#

Show image

hard dew
#

ok

#

wait a sec

#

there

#

@stuck flame

stuck flame
#

can you hover over the obj

#

It gotta say something

hard dew
#

nothing

#

acc

#

i think the obj might be a variable

#

the actual item is named coin

hard dew
stuck flame
#

Put it inside of a function

#

oh

rose holly
hard dew
#

no

#

i didnt copy paste it

stuck flame
#

change obj to coin or whatevrr

hard dew
#

ok, so I want the local previousparent equal to the parent of the coin

#

right?

stuck flame
#

yea

hard dew
#

the parent of the coin is a folder

#

the same folder is the parent of the script

hard dew
#

not working

#

when i add the code, the shine doesnt collect but that is because the coin is a model

hard dew
#

if i make it a specific part in the model then it works like previousPosition = obj.Part.Position then it works cuz apparently you cant assign the position thing to models

#

but then i cant collect the clone that is made of the coin