I made a thing where it checks if enemy players are near or not if yes then some stuff will glow
but im getting some errors
one of them being something about Character or something
heres my script
while wait() do
for _,v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil and v.Team ~= game.Players.LocalPlayer.Team and v.Character:FindFirstChild(“HumanoidRootPart”) ~= nil and (v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude <= range then
glow()
end
end
end
and sorry im new to the fourm idk how to use the bb code thing
Any help would be nice!
You can make a code snippet by putting 3 ` (not ') before and after the code section. You can also make a line formatted as code by putting 4 spaces before it.
You should also probably provide the error in full, as “[its] about character or something” doesn’t really help! What does it say? Which line is on?
Just from the “about Character or something” it might be an issue where if the LocalPlayer doesn’t have a character, you’d get an issue there? So may be this part: game.Players.LocalPlayer.Character
But like @Mario118118 said, you should copy the error from the output because just guessing at what it is you’re probably not going to get accurate answers.
What’s the error you’re getting though? Can you copy & paste that here? It usually has line numbers and stuff in there that help to figure out what the problem is