#ViewPort Clone Animation doesn't line up with animaton ingame
82 messages · Page 1 of 1 (latest)
Where do you have in Script Stoping at move?
I started deleting the wrong messages
** You are now Level 1! **
You can just create local function stop()
and call "stop()" in your scripts
😉
It will be better
This is in StarterPlayer>StarterCharacterScripts>Emote
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animation = script:WaitForChild("Dance")
local UIS = game:GetService("UserInputService")
local isTrue = false
local LoadedAnimation = Humanoid:LoadAnimation(Animation)
local Character = script.Parent
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.E then
if realorfake == false then
LoadedAnimation:Play()
isTrue = true
else
LoadedAnimation:Stop()
isTrue = false
end
end
end)
Character.Humanoid.Running:Connect(function(speed)
if speed > 0.1 then -- Walking
LoadedAnimation:Stop()
isTrue = false
end
end)```
Like this:
local function prnt()
print("out")
end
game.WorkSpace.Value.Changed:Connect(Function()
print("please wait")
prnt()
end)
HMMM
What is realorfake?
I'll change that
Okay
HMMM
IDK, but "local Character = ..."
move up... On the top
Character move UP
😄
It will be better
The order sometimes matters quite a bit
I don't know exactly how this script works, because on the video I can see that there are 2 animations. One of the figure in the "GUI" and the other of the player
But I see in your code only One animation
theres only one
or do you mean the guy on the bottom right
thats a different script
:/
the output is kinda useless here
Did you send the whole script?
heres the viewport script
realorfake is just isTrue
everything below Emote fix is what I did to try to fix it but it didn't work also the print did not print
Is this the whole script?
yes
O - O
theres 2 scripts
K
One is Server Script and seconds Local Script?
Or is there some Module Script?
yes
wait
theyre both local scripts since both need to appear differently for different people
originally I didn't intend for the guy on the bottom right to copy the animations but it just did I never intentionally made it emotes for both
so not really
OKAY
I'm pretty sure the mini guy is just a clone
hes inside the starter gui inside of the viewport
** You are now Level 2! **
Can you please send it to me in the format it looks like in Studio? Labels can be deleted and printed as well 😉
I think it will fit here when trimmed. 😉
wdym format
?
what do you mean format
I dont know what that means in scripiting
as in this?
I mean Discord format 😄
I'll have to send multiple messages
-- Variables
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local MouseInDisplay, HoldInDisplay = false, false
local currentX
-- Character Display
local VPFcam = Instance.new("Camera"); VPFcam.Parent = script.Parent.ViewportFrame
VPFcam.CFrame = CFrame.new(0,0,0)
script.Parent.ViewportFrame.CurrentCamera = VPFcam
repeat wait(.1) until game:IsLoaded()
char.Archivable = true
local ClonedChar = char:Clone()
ClonedChar.Parent = script.Parent.ViewportFrame.WorldModel
ClonedChar.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
ClonedChar:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0,0,-9.5),Vector3.new(0,0,0)))
-- Turning Feature
uis.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
if MouseInDisplay == true then
HoldInDisplay = true
currentX = nil
end
end
end)
uis.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
HoldInDisplay = false
end
end)
script.Parent.ViewportFrame.MouseMoved:Connect(function(X,Y)
if HoldInDisplay == false then return end
if currentX then ClonedChar.PrimaryPart.CFrame *= CFrame.fromEulerAnglesXYZ(0,((X-currentX)*.025),0) end
currentX = X
end)
script.Parent.ViewportFrame.MouseEnter:Connect(function() MouseInDisplay = true end)
script.Parent.ViewportFrame.MouseLeave:Connect(function() MouseInDisplay = false end)```
-- Emote Fix
local Animation = script:WaitForChild("Dance")
local UIS = game:GetService("UserInputService")
local realorfake = false
local Character = game.Players.LocalPlayer.Character
local Humanoid2 = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local LoadedAnimation = Humanoid2:LoadAnimation(Animation)
Character.Humanoid.Running:Connect(function(speed)
if speed > 0.1 then
LoadedAnimation:Stop()
realorfake = false
print("stop it mini me")
end
end)```
Wait
Ok
Try that:
Ok
tell me if it will work or no
What did you change?
Invalid animation ID is on text with Animation ID 😄
There: animation.AnimationId = "rbxassetid://<YourAnimationID>"
Okay. 😉 NP
i suggest to make a function thats find all the animation into a folder called emotes and when you move just make it stop