for _,enemy in enemies:GetChildren() do
local LocalNPC = enemy.Character:WaitForChild("Humanoid") LocalNPC:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(PlayersFriends[math.random(1,#PlayersFriends)].Id)) LocalNPC.BodyHeightScale = 1.4 LocalNPC.BodyProportionScale = 1.1 LocalNPC.BodyWidthScale = 1.2 LocalNPC.HeadScale = 1.3 end
shouldnt it be done on the server instead??
and idk whats the issue here
But what if i want to make it client side
You’re going to have to be more clear with what you want to get a good response, I’m assuming you want to get the player on the client which is as simple as
game.Players.LocalPlayer
I want to make the dummies show player friends by client side so players can see only their friends
PlayerFriends is:
local PlayersFriends = {}
local success, page = pcall(function() return players:GetFriendsAsync(player.UserId) end) if success then repeat local info = page:GetCurrentPage() for i, friendInfo in pairs(info) do table.insert(PlayersFriends, friendInfo) end if not page.IsFinished then page:AdvanceToNextPageAsync() end until page.IsFinished end
oh i see now…
Hmmmmmm
i have no idea thought, whats the issue
You are not understanding me.
I want to insert player friend models in the dummy for each player. Which means that the only player can see the dummy models as their friends. But the enemies are showed for everyone
@seraphdive Why don’t you use a server sided thing, and put into a folder with the player username who requests (aka Me, i have a friend example Johny123), it’ll paste in a folder with my name, and then put the character from the server inside the folder(Johny123 character), the client would wait for it, and grab it and put on workspace.
idk if this would work
my english isnt one of the bests, paste = add a new folder in repstorage
and then the server would create a character of johny123, and the client would get the GetChildren() stuff inside the folder, and then you do whatever u want
not sure if this works fine
You could try handling the enemy stuff on the server, then firing a remote to the client that chooses a friend for that enemy and applies the description to the humanoid using this snippet:
local desc = game.Players:GetHumanoidDescriptionFromUserId(firend.UserId)
enemy.Humanoid:ApplyDescription(desc)
Hos does an NPC have the Character property? Character is only for real players. Now, I hink I get what you want. You want to set dummies clothes to the player’s friends, but only on their side.Doesn’t Humanoid:ApplyDescription()
work? Also, it’s a LocalScript right?
Thank you so much, it worked!!!
Humanoid:ApplyDescription()
is not working for client, but instead i tried to instance them on client, and this way it works, but the problem is what where’s no clothes appear
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.