Surface GUI Ship Spawning Script Not Working. Will Someone Please Help Me?
So I have a block where you click a surface GUI and it spawns a ship if you have the correct rank. I have the leader stats already made and working well.
I always get these errors
Solo Player Studio Mode: owner is not a valid member of Players
Live Game Studio Mode: No Output Errors (even with print("test"))
Live Game: Since I'm not the owner of the game and working on making it with them, can't see the f9 output logs...
Here is my code so far----
02 | local owner = script.Parent.Parent.Parent.Parent.Parent.owner.Value |
04 | if game.Players.owner.leaderstats.Rank.Value = = 0 or game.Players.owner.leaderstats.Rank.Value > 0 then |
05 | local ship = game.Lighting.Ships.Stinger:Clone() |
06 | ship.Parent = script.Parent.Parent.Parent.Parent.Parent.Ships |
07 | ship.Position = script.Parent.Parent.Parent.Parent.Parent.cps.Customize.Position |
08 | elseif not game.Players.owner.leaderstats.Rank.Value = = 0 or not game.Players.owner.leaderstats.Rank.Value > 0 then |
09 | print ( "ERROR: Incorrect Rank" ) |
13 | script.Parent.MouseButton 1 Down:connect(onClicked) |
(gaaa all my titles wont work because it needs to be described concisely)