I'm trying to make it where if a value is NOT blank it will fire an event, but instead, it does nothing even tho the value isn't blank. I get no errors at all. What's the problem?
ButtonsFolder.PlayButton.MouseButton1Click:Connect(function() if not ValuesFolder.Class.Value == nil then ReplicatedStorage.Events.SpawnEvent:FireServer(ValuesFolder.Class.Value) else print("Please Select a Class") end end)
StringValue doesn't return nil even if it's empty. It will just return an empty string (""). Try this instead:
ButtonsFolder.PlayButton.MouseButton1Click:Connect(function() if ValuesFolder.Class.Value ~= "" then ReplicatedStorage.Events.SpawnEvent:FireServer(ValuesFolder.Class.Value) else print("Please Select a Class") end end)