-
A gun system gets the character’s head
-
It errors, head not a member of model, but it works in other games…
-
N/A
Use something like:
Players.PlayerAdded:Connect(function(player)
char = player.Character
head = char:FindFirstChild("Head")
end)
Try waiting for the head to load:
local head = Character:WaitForChild("Head") --instead of :FindFirstChild()
local Character = Player.Character
local Head = Character:WaitForChild("Head") or Character.Head
It would have an infinite yield if the head wasn’t found, FindFirstChild is better for this.
local Character = Player.Character or Player.CharacterAdded:Wait()
local Head = Character:FindFirstChild("Head")
Try that.
I found out why, for some reason the script searched in workspace for the player instead of just doing Player.Character