i mean when you enter, you do a spin thing
Oh, yeah thats not part of the animation and actually thats why I posted this topic.
if anything is making your character move, it should be removed
I removed the tween, same thing, spins around and stuff.
are you sure that other script is not interfering? can you disable the exit for now?
Disabled it, same thing. Spinning around.
can you send the current script?
Which one? The enter or the exit script?
the enter one, for now we focus at that
local ts = game:GetService("TweenService")
script.Parent.Triggered:Connect(function(plr)
local idle = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Idle)
local enter = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Enter)
local exit = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Exit)
print("triggered")
plr.Character.HumanoidRootPart.Anchored = true
script.Parent.Parent.In:Play()
--local tween = ts:Create(plr.Character.HumanoidRootPart,TweenInfo.new(0.5,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{CFrame = script.Parent.Parent.CFrame + Vector3.new(0,1,0)})tween:Play()
wait(0.5)
print("Tween completed!")
plr.Character:SetAttribute("hiding",true)
script.Parent.Parent.Parent.IsPlayerInLocker.Value = 1
script.Parent.Enabled = false
script.Parent.Parent.ExitPrompt.Enabled = false
enter:Play()
print("Enter animation playing.")
enter.Ended:Wait()
print("Enter animation ended, idle should be playing now!")
idle:Play()
end)
are you sure the spinning is not part of the animation? who made the animation
I made the animation, and no for sure its not a part of the animation. Proof:
i just realized in your youtube video, your character gets dragged and instead is facing the opposite way!
Yeah, i dont know how to fix this, i tried doing it with the tween using the Orientation property, but it just wont do anything
and also i found this post but idk if this will help Tween CFrame orientation - #3 by StudioNovaHolder
I fixed the problem just by making the parts orientation -90 degrees on the y axis, ill just leave the spinny thing there as i really dont know how to fix it. So now moving on to the exit script, the idle anim will keep on playing and the exit animation doesnt play at all.
well, instead of 2 scripts, cant you make it into 1?
I can try. Here it is:
local ts = game:GetService("TweenService")
script.Parent.HidePrompt.Triggered:Connect(function(plr)
local idle = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Idle)
local enter = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Enter)
local exit = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Exit)
print("triggered")
plr.Character.HumanoidRootPart.Anchored = true
script.Parent.Parent.In:Play()
local tween = ts:Create(plr.Character.HumanoidRootPart,TweenInfo.new(0.5,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{CFrame = script.Parent.Parent.CFrame + Vector3.new(0,1,0)})tween:Play()
wait(0.5)
print("Tween completed!")
plr.Character:SetAttribute("hiding",true)
script.Parent.Parent.Parent.IsPlayerInLocker.Value = 1
script.Parent.Enabled = false
script.Parent.Parent.ExitPrompt.Enabled = false
enter:Play()
print("Enter animation playing.")
enter.Ended:Wait()
print("Enter animation ended, idle should be playing now!")
idle:Play()
end)
script.Parent.ExitPrompt.Triggered:Connect(function(plr)
local idle = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Idle)
local enter = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Enter)
local exit = plr.Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.Parent.Exit)
print("triggered")
script.Parent.Parent.Out:Play()
idle:Stop()
local tween = ts:Create(plr.Character.HumanoidRootPart,TweenInfo.new(0.5,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out),{CFrame = script.Parent.Parent.CFrame + Vector3.new(0,1,0)})tween:Play()
wait(0.5)
--plr.Character.HumanoidRootPart.CFrame = script.Parent.Parent.Parent.ExitCFRAME.CFrame -- i need to add parts
script.Parent.Parent.Parent.IsPlayerInLocker.Value = 0
--local tween2 = ts:Create(script.Parent.Parent,TweenInfo.new(0.5,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{CFrame = script.Parent.Parent.Parent.DoorClosed.CFrame})tween2:Play()
plr.Character.HumanoidRootPart.Anchored = false
plr.Character:SetAttribute("hiding",false)
script.Parent.Enabled = false
script.Parent.Parent.HidePrompt.Enabled = true
exit:Play()
end)
Wait hold on let me fix some bugs