A few big problems
1: You are referencing the StarterGui- that's a big No No.
You see, the contents of the StarterGui are cloned into the player's local PlayerGui. You need to make sure you have the PlayerGui and not the StarterGui. The PlayerGui is a child of the player
Looks like this...
-- local script
local player = game.Players.LocalPlayer
local playerGui = player.PlayerGui
local active = game.StarterGui.ScreenGui.Frame.Active
2: You did not tie an event to your onClick function. When it's clicked, it will never know. You can set up an anonymous event
active.MouseButton1Down:connect(function()
-- do stuff
end)
3: You did not reference any variable named "activated" nor did you reference the functions "activate()" or "unactivate()", so unless you have those and just didn't post them on this thread, you'll need to make them. |