So it works in studio but not in game and I get this error:
11:15:20.766 - Players.Player1.PlayerGui.Main.SpawnTycoon.LocalScript:10: attempt to index global 'chr' (a nil value)
Here's the script:
t = game.Lighting.Tycoon:Clone() plr = game.Players.LocalPlayer chr = plr.Character bd1 = plr.Stats.BuxDrop td1 = plr.Stats.TixDrop bagdrop1 = plr.Stats.BagDrop script.Parent.MouseButton1Click:Connect(function() t.Parent = game.Workspace t.Name = plr.Name t:MoveTo (Vector3.new(chr.LeftLowerArm))
add game.Workspace:WaitForChild(game.Players.LocalPlayer) to the beginning of the script
it works in studio because it runs faster, and in the game it will not register the var immediately after the game has started