Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Im trying to have a data stringvalue show up on a textgui (Fix or rescript)?

This script is suppose to show the DevilFruit value on a gui but the devilfruit is a string value, I think that's why it's not working.

while true do
script.Parent.Text = "DevilFruit" .. math.floor(script.Parent.Parent.Parent.Parent.Parent.Data.DevilFruit.Value)
wait(1)
end

2 answers

✓ Accepted answer

You can't use math.floor with string values. If you are trying to put the value onto the text label, then simply put the value, and not math.floor. Please try to expand on your question. What are you trying to have it do?

1 comment

0

Thanks it works now you're a genius :3

This should help.

math.floor(tonumber(script.Parent.Parent.Parent.Parent.Parent.Data.DevilFruit.Value))

tonumber makes a value into a number, and if it can't be a number, it returns nil. Same with tostring, etc.

This discussion is preserved as it was. New answers, comments, and votes are closed.