-
What do you want to achieve?
I would like to make it so if you click a click detector and a value in replicated storage is true, a GUI appears on the player’s screen. -
What is the issue?
Issue A: GUI Shows up if the value is false.
Issue B: If the value is true it wont show up but registers the click and says its showing with print statement. -
What solutions have you tried so far?
I’ve tried fixing it myself and seeing if anyone has had a similar issue.
--This script is in ServerScriptService
game.Workspace:WaitForChild("BigBox"):WaitForChild("ClickDetector").MouseClick:Connect(function(Player)
print(Player.Name.." Clicked")
if game.ReplicatedStorage:WaitForChild("Values"):WaitForChild("Box").Value == true then
print("Value Is True")
if Player.PlayerGui:WaitForChild("BigBoxGui").Enabled == false then
print("Showing GUI")
Player.PlayerGui:WaitForChild("BigBoxGui").Enabled = true
else
print("Taking Away GUI")
Player.PlayerGui:WaitForChild("BigBoxGui").Enabled = false
end
else
print("Value Is Not True")
end
end)
Video to visualize where stuff is at and what I am doing: