Hello, so when i run my function, ii check if the target is a player, and somehow it doesn’t print. I don’t know what i did wrong. Look at the code.
Note; i have more code but that is irrelivent.
local IsAPlayer
function Target(Target)
local TargetString = tostring(Target)
if not Players:FindFirstChild(TargetString) then
print(TargetString.." is not a player")
IsAPlayer = false
else
print(TargetString.." is a player")
IsAPlayer = true
end
print("AAAAAAAAAAAAAA") -- this prints
print(IsAPlayer) -- this doesn't print
end
local IsAPlayer
function Target(Target)
IsAPlayer = Target:IsA("Player")
print("AAAAAAAAAAAAAA") -- this prints
print(IsAPlayer) -- this doesn't print
end
local IsAPlayer
function Target(Target)
local TargetString = tostring(Target)
if not Players:FindFirstChild(TargetString) then
print(TargetString.." is not a player")
IsAPlayer = false
else
print(TargetString.." is a player")
IsAPlayer = true
end
wait(0.1)
print("AAAAAAAAAAAAAA") -- this prints
print(IsAPlayer) -- this doesn't print
end