This LocalScript inside a TextButton is supposed to award a badge to a users id, that the player chooses, due to a text label holding text of a player, and the local script should award the badge to that player name in the text label. i get an error saying it cant find anything in int64
local bs = game:GetService("BadgeService")
local ps = game:GetService("GamePassService")
local pass = 9289382
local badge = 0000000
local playert = script.Parent.Parent.thename
local player = game.Players.LocalPlayer
local UserId = game.Players.LocalPlayer.UserId
local useridt = playert.Text..UserId
pass = false
if ps:GetChildren(player.UserId, pass) then
pass = true
if pass == true then
script.Parent.Text = "Multiplier Die"
script.Parent.MouseButton1Click:Connect(function()
bs:AwardBadge("playert"..useridt, badge)
game:GetService("Players").LocalPlayer.PlayerGui.GiveDie.Enabled = false and game:GetService("Players").LocalPlayer.WhichGive.Enabled == false
end)
end
end

2 comments
ok but how do i get the user id of a persons username through the text of a textlabel
you can use a remote event. look on the developer wiki for em