So I have 4 parts that are inside of each other with click detectors with the activation distance of 0. Then a user does something and activates this script.
local Jobs = script.Parent.Parent.Jobs function Unlock(Card) if Card.Name == "Card1" then Jobs.Job4.Transparency = 0 Jobs.Job4.SurfaceGui.Enabled = true Jobs.Job4.ClickDetector.MaxActivationDistance = 32 script.Parent.Job.Value = 1 Card.Parent = game.Lighting Card.Anchored = true script.Parent.Parent.Screen.SurfaceGui.CurrentJob.Text = "Mechanic (COMING SOON)" end if Card.Name == "Card2" then Jobs.Job3.Transparency = 0 Jobs.Job3.SurfaceGui.Enabled = true Jobs.Job3.ClickDetector.MaxActivationDistance = 32 script.Parent.Job.Value = 2 Card.Parent = game.Lighting Card.Anchored = true script.Parent.Parent.Screen.SurfaceGui.CurrentJob.Text = "Gormet Chef (COMING SOON)" end if Card.Name == "Card3" then Jobs.Job1.Transparency = 0 Jobs.Job1.SurfaceGui.Enabled = true Jobs.Job1.ClickDetector.MaxActivationDistance = 32 script.Parent.Job.Value = 3 Card.Parent = game.Lighting Card.Anchored = true script.Parent.Parent.Screen.SurfaceGui.CurrentJob.Text = "Office Worker (NOT FINISHED)" end if Card.Name == "Card4" then Jobs.Job2.Transparency = 0 Jobs.Job2.SurfaceGui.Enabled = true Jobs.Job2.ClickDetector.MaxActivationDistance = 32 script.Parent.Job.Value = 4 Card.Parent = game.Lighting Card.Anchored = true script.Parent.Parent.Screen.SurfaceGui.CurrentJob.Text = "Store Clerk (COMING SOON)" end end script.Parent.Touched:connect(Unlock)
Accept when on of the Jobs activation distances go to 32 it won't let me click on it. Only Job1 works the rest do now. And also only one has the activation of 32 once the script is ran. Anyways to solve this?