Roblox World Unlock System

Hello, I am trying to make a world unlock system for a simulator I am working on. What I want to happen is, a player reaches a new planet, once the reach the planet they unlock a new teleporter at spawn.

The issue I am having is that the world’s unlock pad isn’t unlocking(The color isn’t changing)

I have tried making a touch part, which sets a bool value to true and I made a script in the the world pad which detects if the bool value is true then it changes the color,.

1 Like

Is the issue that world is not unlocking (the bool value is unchanged) or that the script to change the color isn’t working?

Both, The bool isn’t changing which causes the color not to change.

Alright. Does the :Touched() event fire? Maybe you could hook the pad unlocking up to some other place in your code, for example if they need to pay something to unlock it you could set the bool value there?

I fixed it, I retyped the script but I have no idea what the issue was.

This is the working script inside of the touch part.