So im confused with this script, it’s suppose to be printing Error or fired if it’s working but it’s printing none of those, why?
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.CreateFrame.Visible = false
local hardcore = script.Parent.Parent.Hardcore.Value
local Selected = script.Parent.Parent.SelectedMode.Value
local level = script.Parent.Parent.LevelVal.Value
local DungeonName = script.Parent.Parent.DungeonName.Text
local GamesMade = script.Parent.Parent.Parent.GamesMade
if Selected == "" then
if level == "0" then
if DungeonName == "" then
print("Error")
script.Parent.Parent.Errormsg.Visible = true
wait(1)
script.Parent.Parent.Errormsg.Visible = false
else
game.ReplicatedStorage.Events.CreateParty:FireServer(hardcore, Selected, level, DungeonName, GamesMade)
print("Fired")
end
end
end
end)
Probably cause of these 2 statements not checking if your Selected/level variables are equal to your strings you implemented, try adding else statements to those as well & print out those variables
try this and check whats the highest number you will get
edit: i didnt see that you have already found the issue yourself
script.Parent.MouseButton1Click:Connect(function()
print("1")
script.Parent.Parent.Parent.CreateFrame.Visible = false
local hardcore = script.Parent.Parent.Hardcore.Value
local Selected = script.Parent.Parent.SelectedMode.Value
local level = script.Parent.Parent.LevelVal.Value
local DungeonName = script.Parent.Parent.DungeonName.Text
local GamesMade = script.Parent.Parent.Parent.GamesMade
if Selected == "" then
print("2")
if level == "0" then
print("3")
if DungeonName == "" then
print("Error")
script.Parent.Parent.Errormsg.Visible = true
wait(1)
script.Parent.Parent.Errormsg.Visible = false
else
game.ReplicatedStorage.Events.CreateParty:FireServer(hardcore, Selected, level, DungeonName, GamesMade)
print("Fired")
end
end
end
end)