1 | for _,v in pairs (game.Players:GetChildren()) do |
2 | thing = script.AnnounceGui:clone() |
3 | thing.Frame.Position = UDim 2. new(v:GetMouse().ViewSizeX/ 200 , 0 ,v:GetMouse().ViewSizeY/ 200 , 0 ) |
4 | thing.Parent = v.PlayerGui |
5 | end |
It threw an error saying it couldn't index a nil value with v:GetMouse. But I'm definately talking about players with v because I'm iterating through the players. Why is this going wrong?
:GetMouse() only works from a localscript, and it will only get the mouse of the player that the script is in