Hello!
I am wondering why my elseIf statement isn't working correctly. As, when the value is set at 0, it prints out Hi. However, when the value is set at 1, and I click on my gui. It does not print anything at all! I would appreciate some help. As I have spend an hour on this and can't seem to figure it out.
local Gui = script.Parent.Picture
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("Events").SaveDataReturn
Gui.MouseButton1Down:Connect(function()
Event:InvokeServer()
local Value = ReplicatedStorage.Return.SaveData
if Value == 0 then
print("Hi")
elseif Value == 1 then
print("Tween")
end
end)

1 comment
I think on line 15 you might want to change SaveData to SaveData.Value see if that fixes it, or try making it into 2 if statements