vts3g
(vts3g)
February 10, 2024, 9:02pm
#1
why is argument 1 missing or NULL when used for local AvatarIcon, IsReady = Players:GetUserThumbnailAsync(UserId, ThumbType, ThumbSize)
SubmitLocalAnnouncementRemoteEvent.OnServerEvent:Connect(function(SendMessagePlayer, ClearMessage)
ControlModule.LocalAnnouncement(SendMessagePlayer, ClearMessage)
end)
function Control.LocalAnnouncement(SendMessagePlayer, ClearMessage)
ShowLocalAnnouncementRemoteEvent:FireAllClients(SendMessagePlayer, ClearMessage, Lesson)
end
ShowLocalAnnouncementRemoteEvent.OnClientEvent:Connect(function(TargetRemoteEventPlayer, SendMessagePlayer, ClearMessage, Lesson)
local UserId = SendMessagePlayer.UserId
local ThumbType = Enum.ThumbnailType.AvatarBust
local ThumbSize = Enum.ThumbnailSize.Size420x420
local AvatarIcon, IsReady = Players:GetUserThumbnailAsync(UserId, ThumbType, ThumbSize)
end)
vts3g
(vts3g)
February 10, 2024, 9:10pm
#3
yes, there is such a variable at the top: local Players = game:GetService(“Players”). What can be done?
Doomcolp
(dxxmed)
February 10, 2024, 9:10pm
#4
That shouldn’t be the issue. That function is to be called from the Players
class.
That’s why there’s a UserId
parameter
I’ll be scouting for other potential errors
vts3g
(vts3g)
February 10, 2024, 9:12pm
#5
if anything this is a local script in starter player scripts
Doomcolp
(dxxmed)
February 10, 2024, 9:12pm
#6
Could you show us what is calling this event potentially?
ne_sabina:
ShowLocalAnnouncementRemoteEvent.OnClientEvent:Connect(function(TargetRemoteEventPlayer, SendMessagePlayer, ClearMessage, Lesson)
You don’t send 4 arguments to the client, only 3:
There is no default argument for OnClientEvent
; the parameters match what you sent to it from the server
1 Like
vts3g
(vts3g)
February 10, 2024, 9:17pm
#8
I don’t think that’s the issue
vts3g
(vts3g)
February 10, 2024, 9:18pm
#9
but the first argument of OnClientEvent is the default event target, so you don’t have to specify it?
No, only OnServerEvent
has a default argument
system
(system)
Closed
February 24, 2024, 9:22pm
#11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.