nope wont load stilleeeeeeeeeeeeeeee
so when youâre in studio, you can see the dummy in the viewportframe. But once you play test the game, the dummy suddenly dissapears? If this is the case, make sure the âCurrentCameraâ property of the ViewPortFrame is set to the Duplicated Camera that i told you to set in the ViewPortFrame earlier.
this is what it looks like with me, i put the camera inside of the ViewPortFrame and called it âVPCamâ
i fixed that issue the only problem i am having is YOUR avatar wont show on the dummy
Did you add a localscript inside of the viewportFrame?
CODE:
local player = game:GetService("Players").LocalPlayer
local ViewportFrame = script.Parent
local DummyReference = ViewportFrame:FindFirstChild("World"):FindFirstChild("Dummy")
local animation = DummyReference.Humanoid:LoadAnimation(script:FindFirstChild("Animation"))
animation.Looped = true
local function CreateCharacter(UserID, Dummy) -- getting the player's items
local Appearance = game.Players:GetHumanoidDescriptionFromUserId(UserID) -- getting the appearance
Dummy.Humanoid:ApplyDescription(Appearance) -- applying it to the dummy
end
CreateCharacter(player.UserId, DummyReference)
animation:Play()
yes i didddddddddddddddddddddddddddddd
also make sure the dummy is inside of a âWorldModelâ because else it wonât animate the dummy.
already did thatttttttttttttttttttttttt
does it error in the output???
thats error it shows line 8 i think
also how do i make it only show when i am on the main menu screen
â
This is because weâre trying to do :ApplyDescription()
in a localScript which can only be done in a server script. This is what i would do:
- Add a script (not localscript) into the ServerScriptService
- Put the âDummyâ model, that was previously in the viewportframe, in the ReplicatedStorage
- Add a RemoteEvent called âAddAppearanceâ and put it in the ReplicatedStorage also
Write the following code inside of the Server Script (serverScriptService):
local function CreateCharacter(UserID, Dummy) -- getting the player's items
local Appearance = game.Players:GetHumanoidDescriptionFromUserId(UserID) -- getting the appearance
Dummy.Humanoid:ApplyDescription(Appearance) -- applying it to the dummy
end
game.Players.PlayerAdded:Connect(function(player)
local dummy = game:GetService("ReplicatedStorage"):WaitForChild("Dummy"):Clone()
dummy.Name = player.Name
CreateCharacter(player.UserId, dummy)
game:GetService("ReplicatedStorage"):WaitForChild("AddAppearance"):FireClient(player, dummy)
end)
localScript (inside of the viewportframe):
local ViewportFrame = script.Parent
game:GetService("ReplicatedStorage"):WaitForChild("AddAppearance").OnClientEvent:Connect(function(dummy)
dummy.Parent = viewportframe.World
local animation = dummy.Humanoid:LoadAnimation(script:FindFirstChild("Animation"))
animation.Looped = true
animation:Play()
end)
could you format the script please?
what does that mean? ? ?? ? ? ? ? ?
localScript (inside of the viewportframe):
local ViewportFrame = script.Parent
game:GetService("ReplicatedStorage"):WaitForChild("AddAppearance").OnClientEvent:Connect(function(dummy)
dummy.Parent = viewportframe.World
local animation = dummy.Humanoid:LoadAnimation(script:FindFirstChild("Animation"))
animation.Looped = true
animation:Play()
end)
seperate basically because someimes they mix
ok i did all the steps but i dont even see the dummy now
does it error? show me the output
no because if tis in storage its not being used correct
my dumb**** put it in server storageâŚ