I have a seat, which has a regular script inside. Whenever a player sits in the seat, a local script that is inside of the regular script is cloned and put into the PlayerScripts folder. This is on line 9. Just to see if it was my script, I changed PlayerScripts to PlayerGui, and it cloned just fine.

script.Parent.Changed:connect(function(type)
	if type == "Occupant" and script.Parent.Occupant then
		local list = game.Players:GetChildren()
		for i = 1, #list do
			if list[i].Character.Humanoid == script.Parent.Occupant then
				script.Parent.Parent.Parent = list[i].Character
				print(list[i].Name)
				local shipControl = script.Ship_Control:Clone()
				shipControl.Parent = list[i].PlayerScripts
				shipControl.Seat.Value = script.Parent
				shipControl.Disabled = false
			end
		end
	end
end)

The error I am getting is:

PlayerScripts is not a valid member of Player

So I'm not sure if I'm missing a step that is needed to access the PlayerScripts folder, or I'm trying to do something that is not possible.

1 comment

0

You already posted this?