STUDIO SURFACE GUI NOT RESPONDING TO MOUSE BUTTON 1 CLICK!
Im making a little big planet game, but the surface gui is not responding, even tho its supposed to.
I dont know if this is a studio or camera issuse because theres no error but it doesnt visiblify the ui in the players playergui, and i tried everything and it doesnt work.
HERES THE SCRIPT!
local plr = nil
game.ReplicatedStorage.PlrUsingPc.Event:Connect(function(player)
plr = player
end)
game.ReplicatedStorage.PlrStoppedPc.Event:Connect(function(player)
plr = nil
end)
script.Parent.SurfaceGui.ButtonProfile.MouseButton1Click:Connect(function()
if plr ~= nil then
if plr:FindFirstChild("MainUI") then
if plr.MainUI:FindFirstChild("CampaignGui") then
plr.MainUI.CampaignGui.Visible = true
else
print("no campaign")
end
else
print("no main ui")
end
else
print("no player")
end
end)