first time using remote fucntion, Idk what am doing wrong
client script =
local function CreateNewCharacter(RequestedCharacter)
print("a")
local RequestedCharacterInstance = InstallCharacter:InvokeServer(Players:GetUserIdFromNameAsync(RequestedCharacter))
print("a2")
end
local InstallCharacter = game.ReplicatedStorage.InstallCharacter
local function InstallCharacterFunction(Player, IDofUser)
print("a")
local DummyClone = game.ReplicatedStorage.Dummy:Clone()
DummyClone.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(IDofUser))
end
InstallCharacter.OnServerInvoke = InstallCharacterFunction
Where are the scripts located? Also, you need to return your value from the server-sided callback. You should also be calling GetUserIdFromNameAsync from the server
local function InstallCharacterFunction(Player, RequestedCharacterUser)
print("a")
local DummyClone = game.ReplicatedStorage.Dummy:Clone() ; local UserId = game.Players:GetUserIdFromNameAsync(RequestedCharacterUser)
DummyClone.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(UserId))
return true
end
still Same result, yields function and doesnt invoke
the local script is a StarterCharacterScript, the remoteFunction and serverscript is in replicatedStorage
im trying to return the instance but another problem
this is erroring
local InstallCharacter = game.ReplicatedStorage.InstallCharacter
local Players = game:GetService("Players")
local function InstallCharacterFunction(Player, RequestedCharacterUser)
print("a")
local DummyClone = game.ReplicatedStorage.Dummy:Clone()
local UserId = Players:GetUserIdFromNameAsync(RequestedCharacterUser)
local Appearnce = Players:GetHumanoidDescriptionFromUserId(UserId)
print(Appearnce, UserId)
DummyClone.Humanoid:ApplyDescription(Appearnce)
return DummyClone
end
InstallCharacter.OnServerInvoke = InstallCharacterFunction
00:48:17.183 HumanoidDescription 214360795- Server - ServerUtility:9
00:48:17.217 Humanoid::ApplyDescription() DataModel was not available - Client - NPCClientHandler:35
Correct. That error is raised when the Humanoid instance you apply the description to is not currently a descendant of the data-model (game). This circumstance can also cause other API members to fail, such as Animator:LoadAnimation