Unable to cast string to bool, What?
Asked by
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)
01 | local animation = game.ReplicatedStorage.Animations:FindFirstChild(Up, Down, Left, Right) |
03 | if 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 |
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) |
16 | plr.playerValues.UpAnimation = Up |
17 | plr.playerValues.DownAnimation = Down |
18 | plr.playerValues.LeftAnimation = Left |
19 | plr.playerValues.RightAnimation = Right |
24 | plr.playerValues.UpAnimation = Up |
25 | plr.playerValues.DownAnimation = Down |
26 | plr.playerValues.LeftAnimation = Left |
27 | plr.playerValues.RightAnimation = Right |
end