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

BoolValue won't change? Get an Error-Line

Heya!

I'm scripting some stuff and found it something ain't working. Don't know why.

I use a LocalScript in StarterPlayerScripts,

The script uses

if workspace.PlayerInfo.Ready.Value == true then

Later in the script i'd like to change the value to false. Using this:

workspace.PlayerInfo.Ready.Value = false

How ever, it won't change. So i've typed to following BELOW the line above.

print("Ready Status = " ..workspace.PlayerInfo.Ready.Value.. "." )

But then, it gives me an Output-Error:

Players.HeadlessDeathSpeaker.PlayerScripts.ControlScript:68: attempt to concatenate field 'Value' (a boolean value)

Is there anyone who could explain me whats going wrong?

i've googled stuff but i won't find out what the issue is...

2 comments

0

Try: print('Ready Status = '..workspace.PlayerInfo.Ready.Value..'.')

0

You're trying to concatenate a boolean value with a string, that won't work, try to put the value inside a tostring().

1 answer

im taking it from ur output that ur using a boolvalue and in that case its

if workspace.PlayerInfo.Ready.Value == Enabled then

but if ur using another value where u do use costume words then you need "true" and false" instead true and false

1 comment

0

if this helps then pls accept the answer

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