C
C#2y ago
Zimri

❔ how to reference a variable in another script?

so i have 2 scripts, my score script, and my movement script i would like to be able to use the score variable in my score script to make you faster like coins in mario kart all the videos i have seen on this were too confusing for me, can anyone help?
4 Replies
Zimri
ZimriOP2y ago
ok so update, i figured out i needed to use a serialized field and so this is where am at rn
anita
anita2y ago
"use the score variable in my score script" the score variable is in your score script as far as I can see? i guess you would use score.score instead of score on line 45
Zimri
ZimriOP2y ago
yes, i am trying to access a variable from another script and i meant using the variable FROM my score script i tried it and it worked, is it seriously that easy to i even have to the serialized field and alternate object to reference the code from
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server