I have a cutscene and I wanted to take the player id model so they would be playing in the cutscene, but I want it locally so they would see their own player instead of other players:
this is the script I have inside of the dummy:
-- local Players = game:GetService("Players");
local Dummy = workspace.Dummy; -- your dummy
local DummyHumanoid = Dummy.Humanoid; -- dummy's humanoid
Players.PlayerAdded:Connect(function(plr)
local humDes = Players:GetHumanoidDescriptionFromUserId(plr.UserId);
if(humDes)then
DummyHumanoid:ApplyDescription(humDes);
end
end)
make a localscript in StarterPlayer->StarterCharacterScripts, paste the current code and remove the PlayerAdded and replace the plr.UserId with game:GetService("Players").LocalPlayer.UserId
--
local ChaseRig = workspace.ChaseCutscene.RigChase; -- your dummy
local DummyHumanoid = ChaseRig.Humanoid; -- dummy's humanoid
game.Players:Connect(function(plr)
local humDes = game.Players:GetHumanoidDescriptionFromUserId(game:GetService("Players").LocalPlayer.UserId);
if(humDes)then
DummyHumanoid:ApplyDescription(humDes);
end
end)
This is what I have in startcharacterscript but it’s still not working
might not be able to call Humanoid:ApplyDescription() from a local script however Players:CreateHumanoidModelFromUserId() and Players:CreateHumanoidModelFromDescription() ARE able to be called in a localscript
Just set the Parent, Position, etc to what you need it to be.
obviously, serverscripts will not be able to affect this dummmy
---StarterPlayerScripts
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Dummy = Players:CreateHumanoidModelFromUserId(Player.UserId)
Dummy.Parent = game.Workspace
Dummy:FindFirstChild("HumanoidRootPart").Anchored = true
Dummy:PivotTo(CFrame.new(0,3,0))
Dummy.Name = Player.Name
Should probably add that the above is in StarterPlayerScripts + in a local script
This is probably the best way I could think of to make sure other players can’t see the same dummy / other player’s avatar, each player will have their own dummy.
In the dummy for the animation, I have a script in it, and idk how to reput the script in the dummy if it clones the dummy, so I am trying to figure out how to make a dummy that already has the script turns into the player
You could make the original dummy invisible, and CFrame all the body parts of the new clone to the dummy’s bodyparts on RenderStepped. (All on the client of course)