Hello so yesterday i made a Invite System so you can invite someone the Localscript is in Startergui
and this is the code.
code:
local SocialService = game:GetService("SocialService")
local Player = game.Players.LocalPlayer
game.ReplicatedStorage.InviteEvent.OnClientEvent:Connect(function()
local success,result = pcall(
function()
return SocialService:CanSendGameInviteAsync(Player)
end
)
if result == true then
SocialService:PromptGameInvite(Player)
end
end)
Strange warning:
08:42:28.901 Unhandled Promise rejection:
-- Promise.Error(ExecutionError) --
The Promise at:
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:43
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.FetchUserFriends:20
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CorePackages.Packages._Index.RoactRodux.RoactRodux.connect:134 function dispatch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:56 function reFetch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:31 function init
CorePackages.Packages._Index.React.React.ReactBaseClasses:250 function __ctor
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberClassComponent.new:741 function constructClassInstance
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:1047 function updateClassComponent
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:3584 function beginWork
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:254
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1926
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1909
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1852
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:893
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:841
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:304
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:259
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:82 function doWork
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:104 function performWorkUntilDeadline
...Rejected because it was chained to the following Promise, which encountered an error:
The Promise at:
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:38
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.FetchUserFriends:20
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CorePackages.Packages._Index.RoactRodux.RoactRodux.connect:134 function dispatch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:56 function reFetch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:31 function init
CorePackages.Packages._Index.React.React.ReactBaseClasses:250 function __ctor
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberClassComponent.new:741 function constructClassInstance
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:1047 function updateClassComponent
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:3584 function beginWork
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:254
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1926
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1909
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1852
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:893
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:841
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:304
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:259
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:82 function doWork
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:104 function performWorkUntilDeadline
...Rejected because it was chained to the following Promise, which encountered an error:
CorePackages.AppTempCommon.LuaChat.Utils.getFriendsActiveGamesPlaceIdsFromUsersPresence:13: attempt to index nil with '3421408084'
CorePackages.AppTempCommon.LuaChat.Utils.getFriendsActiveGamesPlaceIdsFromUsersPresence:13
CorePackages.AppTempCommon.LuaApp.Thunks.ApiFetchUsersPresences:18
CorePackages.Packages._Index.Promise.Promise:151 function runExecutor
CorePackages.Packages._Index.Promise.Promise:160
Promise created at:
CorePackages.AppTempCommon.LuaApp.Thunks.ApiFetchUsersPresences:14
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:42
CorePackages.Packages._Index.Promise.Promise:151 function runExecutor
CorePackages.Packages._Index.Promise.Promise:160
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.ApiFetchUsersFriends:43
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Thunks.FetchUserFriends:20
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:15
CorePackages.Packages._Index.roblox_rodux.rodux.thunkMiddleware:14
CorePackages.Packages._Index.roblox_rodux.rodux.Store:98
CorePackages.Packages._Index.RoactRodux.RoactRodux.connect:134 function dispatch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:56 function reFetch
CoreGui.RobloxGui.Modules.Settings.Pages.ShareGame.Components.ShareGameContainer:31 function init
CorePackages.Packages._Index.React.React.ReactBaseClasses:250 function __ctor
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberClassComponent.new:741 function constructClassInstance
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:1047 function updateClassComponent
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberBeginWork.new:3584 function beginWork
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:254
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1926
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1909
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:1852
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:893
CorePackages.Packages._Index.ReactReconciler.ReactReconciler.ReactFiberWorkLoop.new:841
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:304
CorePackages.Packages._Index.Scheduler.Scheduler.Scheduler:259
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:82 function doWork
CorePackages.Packages._Index.Scheduler.Scheduler.forks.SchedulerHostConfig.default:104 function performWorkUntilDeadline
- Client - Promise:1299