My project is bugged!

1 sentence description of the problem:
When i use the variables in hopscotch it doesn’t work
Steps to reproduce the problem every time:
(Start in a blank draft if possible)

1.make a project
2.make a character and when you tap it you get points
3.make a text that displays the points

I expected this to happen:
For it to display the points correctly
But instead this happened:
It stayed at 0 even when i tapped it
(Include project link if relevant)

Device details:

(You can go to :gear: > “About”, and take a screenshot


Hello again rosewood! It seems like you used a local variable. Local variables cannot be used between different objects. In this example, you should be using a game variable. I’ll insert an image below so you can understand more clearly :))


Thanks!!! You’re a lifesaver! I’m new to coding and I don’t yet understand know how variables works so yeah :sweat_smile:


Local variables are variables that are scoped to a specific object or container, and will only work within that container

Object variables are variables whose values are unique to the object (but can still be used by other objects and can see other object’s value)

Game variables are variables that are global to the project

User variables (advanced mode only) are variables that persist between plays. They are unique to the device they were set on.


Do object variables work with clones?


yes but you can’t reference them with anything except that specific clone


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.