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

Script Cannot read value from a string value?

Asked by
jman116 10
9 years ago

I am making a tycoon, the owner's name is stored in a string value. My script keeps telling me this:

17:26:30.336 - Unable to cast value to Object 17:26:30.336 - Script 'Workspace.Computer.Tycoon.BNScript', Line 5 17:26:30.336 - Stack End

and my code is this:

Tycoon = script.Parent
Reference = Tycoon["Code a simple bot net: 20 monies"]
Reference.Parent = nil
Pllayer = Tycoon.Parent.Player
player = Game.Players:GetPlayerFromCharacter(Pllayer.Value)

Please tell me what is wrong and, how to fix it.

1 answer

Log in to vote
0
Answered by
wackem 50
9 years ago

Check your parent tree again "Tycoon.Parent"? Shouldn't Tycoon be the master parent?

0
Ok, Tycoon's parent is computer, and computer has the value in it jman116 10 — 9y
Ad

Answer this question