Hi there Other Developers,
I’ve been running into this issue where I can’t get the playerID of another player in the server,
here is my code:
DetailsFrame:WaitForChild("ApplyButton").Activated:Connect(function()
if ReasonTextBox and DetailsFrame:WaitForChild("PlayerTextBox") ~= "" then
local PlayerSelected = game.Players:FindFirstChild(DetailsFrame.PlayerTextBox.Text)
if PlayerSelected ~= nil then
AdminStorage.Events.AdminCMDEvent:FireServer(
CommandType, ReasonTextBox.Text, PlayerSelected.UserID --// Here is the bug)
end)
end
end)
And the error in the output:
Thanks a lot!