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
InteractPrompt.Triggered:Connect(function(Player)
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
RestingAnim:Play()
elseif Resting == true then
Resting = false
Humanoid.AutoRotate = true
HumanoidRootPart.Anchored = false
RestingAnim:Stop()
RestingAnim:Destroy()
end
end
end)
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.
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.
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”
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.
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.
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?
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.