What's wrong with my script


The IQ is not showing up hehe

Can you post the structure of your GUI? I’m not sure where the local script and the message text are located just from the code alone.

1 Like

image

Alright, thanks for that. I think your issue is that the GUI is too small to display any further text. Try resizing it on the X axis and see if that works for you.


still nope

Hm, that’s odd.

Maybe this script will do it instead. If not, it will display the IQ in the console.

local textLabel = script.Parent
local IQ = 300;
while true do
    textLabel.Text = "IQ: "..tostring(IQ)
    print("Displaying IQ of "..tostring(IQ))
    wait(600)
    IQ = math.clamp(IQ-20,0,300)
end

1 Like

yeah it works thank you brooooooooo

Oh, I just spotted your issue. The issue with your original script is on line 4

Message.Text = "IQ:" tostring(IQ)

The thing wrong here is that there is no concatenation

This would have to change to:

Message.Text = "IQ: "..tostring(IQ) -- Notice the ".." ?

That’s why your original script errored if you’re still wondering.

This is why code pasted into the site is better

1 Like

yeah i forgot the … thank you for your help :slight_smile: