Character is obviously part of Player, however it is giving me the error message that "Character is a nil value". Help me out?
game.Players.PlayerAdded:connect(function(plr)
local uni = game.ServerStorage.Union:Clone()
local head = plr.Character.Head
local weld = Instance.new("Weld", uni)
uni.Parent = plr.Character
uni.Anchored = false
weld.Part0 = head
weld.C0 = head.CFrame:inverse()
weld.Part1 = plr.Character
weld.C1 = plr.Character.CFrame:inverse()
end)

1 comment
It's likely the script is loading before the player, between lines 2 and 3 add the following line; plr.CharacterAdded:wait() --This will tell the script to wait until the event CharacterAdded fires.