code:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local pp = PhysicalProperties.new(.1,.3,0.5,1,.2) local pc = player.Character pc.Head = pp end) end)
when the player is added it is supposed to change the players head physical properties but instead i get the error:
Head is not a valid member of Model
CharacterAdded passes the players model when they ar spawning so use it to ge the players Head. There also may be a small delay before you can access the Head so use WaitForChild. Lastly you need to assing the new PhysicalProperties to CustomPhysicalProperties .
Example:-
local pp = PhysicalProperties.new(.1,.3,0.5,1,.2) -- it is the same for all players game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Head").CustomPhysicalProperties = pp end) end)
Hope this helps.