Local script inside button:
local player = game.Players.LocalPlayer
local char = player.Character
local badgeID = 2124650758
local Lighting = game:GetService("Lighting")
local Event = Lighting:WaitForChild("RemoteEvent")
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Position = UDim2.new(7.327, 0,8.004, 0)
game.ReplicatedStorage.Click:Play()
wait(0.2)
script.Parent.Position = UDim2.new(7.337, 0,7.834, 0)
script.Parent.Parent:TweenSizeAndPosition(UDim2.new({0, 0},{0, 0}), UDim2.new(0.46, 0,0.487, 0)
)
Event:FireServer(player.userId, badgeID)
print("badge awarded")
end)
script in serverscriptservice:
local badgeService = game:GetService("BadgeService")
local Lighting = game:GetService("Lighting")
local Event = Lighting:WaitForChild("RemoteEvent")
function Award(badgeID)
badgeService:AwardBadge(badgeID)
end
Event.OnServerEvent:connect(Award)
What is wrong?

1 comment
Its giving me error Unable to cast Instance to int64 in line 7 of the script.