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

Unable to cast string to bool, What?

Asked by
sameb556 -12
3 years ago
Edited 3 years ago

I'm making a game and I have ran into an error I don't understand Unable to cast string to bool

here's the script:

game.ReplicatedStorage.Remotes.BuyDance.OnServerInvoke = function(plr, Up, Down, Left, Right)

01local animation = game.ReplicatedStorage.Animations:FindFirstChild(Up, Down, Left, Right)
02 
03if plr.leadersats.Points.Value >= animation.Price.Value then
04    if not plr.playerValues.Animations:FindFirstChild(Up, Down, Left, Right) then
05        plr.leaderstats.Points.Value -= animation.Price.Value
06 
07        local valUp = Instance.new('StringValue', plr.Animations)
08        local valDown = Instance.new('StringValue', plr.Animations)
09        local valLeft = Instance.new('StringValue', plr.Animations)
10        local valRight = Instance.new('StringValue', plr.Animations)
11        valUp.Name = Up
12        valDown.Name = Down
13        valLeft.Name = Left
14        valRight.Name = Right
15 
View all 33 lines...

end

0
Could you take a screenshot of the console? vonotige 49 — 3y
0
sure sameb556 -12 — 3y
0
I'm kind of new to this website could you tell me how sameb556 -12 — 3y
0
I would use a discord link but i also see people using imgur for screenshots. BulletproofVast 1033 — 3y
View all comments (7 more)
0
No, I need a screenshot of the developer console, not the script itself. vonotige 49 — 3y
0
there it is sameb556 -12 — 3y
0
What is the name of the script? Main_Server or LocalScript? vonotige 49 — 3y
0
Main_Server sameb556 -12 — 3y
0
This is the local script if you need it: https://i.imgur.com/Ot9kd7Q.png sameb556 -12 — 3y
0
I think what the error means is that your’re trying to change a bool value (true or false) to a string value (“text”) 1JBird1 64 — 3y

Answer this question