Player Character spawning invisible

If you do end up rewriting the pet system and would like a starting point you can watch this series from AlvinBlox. I highly recommend it.

I’m not going to rewrite it. I’m very happy with the one I wrote. I don’t see a point in rewriting all of it if there is a relatively simple way to fix it

This bug is so technical and specific that I don’t know why. It’s out of my range of understanding why. You should either hire a scripting master just to figure the code out for like 400 robux, and if you want to do it solo, than wait a while to find good scripters, than tell them about this. Most of my problems where just simple mistakes because I was coding for a long time and I got tired, but this is very confusing. Sorry that I couldn’t really help, It’s just very weird.

1 Like

The only unusual lines of code that I see are these specific ones here, maybe implement a check if the item’s name is equal to what you’re looping through instead of checking if the item is a Model

Other than that though that’s all that I see from your script

I changed it to

for _, item in pairs(player.PetData.Equipped:GetChildren()) do
					local item2 = player.Charatcer:FindFirstChild(item.Value)
					if item2 then
						item2:Destroy()
					end
				end

and it does seem to fix the issue. I don’t know why though. None of the players parts are models so it’s shouldn’t destroy them. Also it wasn’t destroying them but changing their transparency which is really weird. Thank you for your help

1 Like

My only assumption is that since there’s no wait() in your script, the script is running the moment the server is first created & apparently attempts to find your Character Model? No clue though

Also, you misspelled Character

As soon as I fixed that typo it made my character invisible the first time I joined. I give up with this. I’m just going to keep the wait, it seems like the wait is the only thing that works.

1 Like