So on a NON filtering enabled server this is how my gui would work
It would check how many tries you have>
if you have more then 0 you can choose a class
if you don't have more then 0 it just sets it to 0 (just a precaution)
How would I do this with filtering enabled?
(heres the script)
function c()
local ctc= math.random(1,3)
local try = script.Parent.Parent.Tries.Value
if try > 0 then
if ctc == 1 then
script.Parent.Parent.Tries.Value = script.Parent.Parent.Tries.Value -1
script.Value.Value ="Angel"
elseif
ctc == 2 then
script.Parent.Parent.Tries.Value = script.Parent.Parent.Tries.Value -1
script.Value.Value = "Demon"
elseif
ctc== 3 then
script.Parent.Parent.Tries.Value = script.Parent.Parent.Tries.Value -1
script.Value.Value = "Fallen-Angel"
end
elseif try <= 0 then
script.Parent.Parent.Tries.Value = 0
script.Parent.TextButton.Text = "No tries left!"
end
end
script.Parent.TextButton.MouseButton1Click:connect(function()
c()
script.Parent.TextLabel.Text = script.Value.Value
end)

1 comment
Is this a script or a local script? Scripts can't modify GUI elements on the client unless those GUI elements are created by the server. LocalScripts can modify GUI elements on the client however.