- Hi,i want to make script that finds model which name is similar to Player.OwnedTycoon.Value
2.But when i press the button (print(PlrTycoon) is in the script) it prints “nil” in output
but model exists in workspace
- Other details are in the script
script:
local Tycoons = game.Workspace.Tycoon.Tycoons --- it is model located in workspace
local OwnedTycoon = Player.OwnedTycoon ---Whinch tycoon plr has owned it is in the player
script.Parent.MouseButton1Click:Connect(function() --- click button
local PlrTycoon = Tycoons:FindFirstChild(OwnedTycoon.Value) --- i want to find model similar to player.ownedtycoon.value
if OwnedTycoon then
print(PlrTycoon)--- but i doesn't print player's tycoon it prints "nil" , so i can't find model whinc name is similar to ownedtycoon.value
end
end)