This is my script:
Why doesnt it give points?
script.Parent.Touched:Connect(function(hit)
char = hit.Parent
player = game.Players:GetPlayerFromCharacter(char)
if hit.Parent:FindFirstChild("BlueFlag")then
char.BlueFlag.Parent = game.Workspace
player.leaderstats.Points.Value = player.leaderstats.Points.Value + 100
game.Workspace.BlueFlag.RemoveWeld:Invoke()
game.Workspace.BlueFlag.Position = Vector3.new(69.5, 0.5, 40)
game.Workspace.BlueFlag.Anchored = true
end
end)
ERROR: attempt to index global 'player' (a nil value)
Why?

1 comment
Road to 6K!! Almost congrats incapaz!