Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you fix a bad argument #3 to 'Value' (string expected, got boolean) error?

Asked by 7 years ago

This is my script;

game.Players.PlayerAdded:connect(function(player)
    local status = Instance.new("Model")    
    status.Name = "status"
    status.Parent = player

    local startintro = Instance.new("StringValue")
    startintro.Name = "startintro"
    startintro.Value = false
    startintro.Parent = status
end)

This is my ENTIRE Output;

15:47:24.368 - [Development] Project: Monster Trading Card Game was auto-saved to C:/Users/BlackOrange3343/Documents/ROBLOX/AutoSaves/Place_AutoSave_40.rbxl
Ragdoll Physics Loaded
Hello world!
15:47:28.659 - Humanoid is not a valid member of Script
15:47:28.660 - Stack Begin
15:47:28.661 - Script 'Plugin_144773946.RealRagdoll.Ragdoll', Line 4
15:47:28.663 - Stack End
Loading Cutscene Editor...
Bouyer's Ragdoll Physics Loaded
Finished Loading.
Loading Tree Gen...
Finished Loading Tree Gen
15:47:29.503 - Unable to load plugin icon. (x2)
15:47:30.229 - Workspace.Status:8: bad argument #3 to 'Value' (string expected, got boolean)
15:47:30.231 - Stack Begin
15:47:30.232 - Script 'Workspace.Status', Line 8
15:47:30.233 - Stack End
Realism Mod is running on v1.795!
Cutscene Editor Loaded
Hello world!
I TOUCHED THE DIRT!
variables has passed
I CAN'T FIND BATTLEGUI
48
found nothing
48
I TOUCHED THE DIRT!
variables has passed
I CAN'T FIND BATTLEGUI
37
Found something
1

This is the error in the Output;

15:47:29.503 - Unable to load plugin icon. (x2)
15:47:30.229 - Workspace.Status:8: bad argument #3 to 'Value' (string expected, got boolean)
15:47:30.231 - Stack Begin
15:47:30.232 - Script 'Workspace.Status', Line 8
15:47:30.233 - Stack End

and lastly, this is the line where the error is;

startintro.Value = false

line 8

Please help, I can not/do not know how to read errors and I also do not know how to fix them. Please explain what I did wrong, what I should change, what I should add and what should I remove.

Thank you for any comment/answer that helped me!

1 answer

Log in to vote
1
Answered by 7 years ago

You cannot set a string value to false.

local startintro = Instance.new("StringValue")

startintro.Value = false

Do this instead

local startintro = Instance.new("BoolValue")
0
Thanks, really helped! BlackOrange3343 2676 — 7y
Ad

Answer this question