You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I’m trying to make a trade system but every time a I click the button to select a pet to trade it doesn’t pass/enter the if statements
- What is the issue? Include screenshots / videos if possible!
The if statements arent being entered even if its true (Two statements both checking if true or false)
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I haven’t found anything on the devforum that would help.
I’m using a TextButton
newFrame.Click.MouseButton1Up:Connect(function()
print(1)
if newFrame.Checked.Value == true then
print(5)
local success, message = TradeEvents.RemovePetFromTrade:InvokeServer(newFrame.Name, i)
if not success then
print(6)
print(message)
else
print(7)
newFrame.Icon.Visible = false
end
elseif newFrame.Checked.Value == false then
local success, message = TradeEvents.AddPetToTrade:InvokeServer(newFrame.Name, i)
print(2)
if not success then
print(3)
print(message)
elseif success then
print(4)
newFrame.Icon.Visible = true
end
end
print(0)
newFrame.Checked.Value = not newFrame.Checked.Value
end)
Thanks,
Indelton!