I have now spent a very long time writing a script that says that if you equip this tool then in the StarterGui the visibility of an object named there in the script is set to true or false:
if script.Parent.Equipped:Connect() then
game.StarterGui.Objectives.Frame.Framel.Objective1.Visible = false
game.StarterGui.Objectives.Frame.Framel.Objective2.Visible = true
end
(This is a localscript in the tool)
But that never works there comes then always something with a nil value and there I wanted to ask if someone has a better script or a better idea to fix this problem.

1 comment
thank you