#help
33 messages · Page 1 of 1 (latest)
Well, if there are less than 4 players, let's say 2, then the other 2 skins will be random.
Maybe make a table with all the random character skins
Then based on the number of Players:GetChildren
you can adjust the code
and how to make it so that every person who plays must view cutscene on behalf of the main character?
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = -- this is how you would handle its movement
So in aperiaphobia
Ik the camera moves realistically
So what you could do is to
make a loop that constantly tweens the camera CFrame to that part
and you would just move the part itself
local TweenService = game:GetService("TweenService")
local camera = workspace.CurrentCamera
local camPart = workspace.camPart -- or wherever it is
camera.CameraType = Enum.CameraType.Scriptable
local Tween = TweenService:Create(camera, TweenInfo.new(.55), {CFrame = camPart.CFrame})
repeat
Tween:Play()
until -- whatever condition it may be like an attribute being set to false when the cutscene ends
can you help to make a local script that dresses npcs in the skins of their friends/players who play with them?
okay
the main character is watched by every person, but all people have different skins of npcs (these skins of those people with whom he plays).
explained as best I could
I don't think that's very clear to you
No it is
local rig = script.Parent
local Players = game:GetService("Players")
-- Check when a player joins
Players.PlayerAdded:Connect(function(player)
-- Get the friends of the player
local friends = player:GetFriendsOnline()
-- Loop through each player in the server
for _, otherPlayer in ipairs(Players:GetPlayers()) do
-- Check if the other player is a friend
for _, friendId in ipairs(friends) do
if otherPlayer.UserId == friendId then
-- Load the friend's avatar onto the rig
local humanoidDescription = Players:GetHumanoidDescriptionFromUserId(otherPlayer.UserId)
rig.Humanoid:ApplyDescription(humanoidDescription)
return -- Exit after finding and applying the first friend's avatar
end
end
end
end)
Got this from ai
The rig is the thing that you want to load their freinds avatar on
If I understood it correctly, it says about friends, and I need that the npcs put on the skin of random players from the server
not just friends
Oh then do Players:GetChildren
** You are now Level 15! **
Whoops
Sorry do