Hi, I am scripting this thing where once you Trigger The ProximityPrompt the character is supposed to sit down and play a Animation, so far it works but there are still some Issues/Bugs that I can’t Fix like.
- Humanoid.AutoRotate = False Doesn’t Work
- Once I make the Character Play A animation (Resting Animation which is Looped) when I try to make it stop It doesn’t stop so the Character is always playing this Resting/Sitting Animation.
If Anybody can help me fix these bugs I will really Appreciate it.
There are few things to note: ProximityPrompt is inside of a model that Is in workspace and this Script is being executed from workspace. this is not a Local Sided Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local InteractPrompt = script.Parent
local AliveData = ReplicatedStorage.AliveData
local PlayerData = ReplicatedStorage.PlayerData
local RestingAnimation = ReplicatedStorage.Assets.Anims.Misc.Resting
local Rest_Cooldown = false
local Resting = false
if Player then
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
local RestingAnim = Humanoid:LoadAnimation(RestingAnimation)
if Resting == false and Rest_Cooldown == false and not AliveData[Player.Name]:FindFirstChild("Combat") then
Resting = true
Humanoid.AutoRotate = false
HumanoidRootPart.Anchored = true
elseif Resting == true then
Resting = false
Humanoid.AutoRotate = true
HumanoidRootPart.Anchored = false
can you send a video of what happens to get a better idea as well as the heirachy of everything involved in the script?
Sure Ill send a Video of it, I Sadly don’t know what you mean by heirachy of everything involved in the script if you could tell me what you are looking for I will show it to you.
here is the video:
I think it means all the parents and children in explorer.
yeah this is what i meant
Campfire with the ProximityPrompt:
The Resting Animation:
PlayerData and AliveData are not being used for now I am Planning on using them in the future they are for mostly Checking if the character is in combat which has nothing to do with the Issue.
If I have missed something please tell me
You never actually check if you start moving. You just check if you are resting when interacting with the ProximityPrompt. You need to do some humanoid stuff to check when you start moving.
What are you suggesting me to do? and I want you to be little more specific on which part do you mean “you just check if you are resting when interacting with the proximityprompt”
Wait, just to be sure, when you stop resting, do you press E again or do you just press a movement key?
well I am trying to recreate Deepwoken campfire system as you saw in the video, I made my Custom ProximityPrompt UI Code so its hard to see if im pressing but yes, you have to press E again to get up.
Right, never mind this then. I thought you didn’t have to press E again.
by any chance do you know how to fix this?
do you have any other scripts that manipulated the character’s animation? maybe they arent reloading the necessary animations
if you mean are there any other Animations that play. I have to say Idle, maybe if you are holding a tool with idle animations, other than that I don’t think so.
I do have this buggy sprint script so maybe? I’m not sure.
the only necessary Animations are walking running idle. Also I am sorry if this reply sounds very confusing cause I didn’t really understand what you spesifically ment.
what i meant is that is there a script that plays your custom animations such as idle, walking and running when you move and can you pull it up?
yes there is a custom script or you can say a different script that plays custom animations. and what do you mean by pull it up do you mean take a picture of them, show them or?
yeah please take a picture and show it
Sure Ill send what ever Movement Animation I find I will not include the Action ones like slashes cause they only play when you are holding a tool and click.
I looked at most of the scripts and these were only ones with Animation such as sprint,idle,walk
also you should do
local RestingAnim = Humanoid:WaitForChild("Animator"):LoadAnimation(RestingAnimation)
Humanoid:LoadAnimation() is deprecated
wow this is weird, everything seems fine. does the output print any errors?