Hey Guys, I've just joined this server. I was inspired to create my own Gym Game where I can create different things.. I've spent enough time in scripting and know the basics. But from several hours now I cannot do that thing. What I want to create is use Proximity Prompt on model with which you get in a position and play the animation upon clicking. I've searched for such youtube tutorials and did not found any.. If you can help me understand how it works and how to do I would appirciate it. It's crucial as it's my first game! You can see the Animation and the Pull up Bar. I want to create simply Hold E from proximity prompt get onto the bar. Press MouseButton and play animation! Also I want to ask do I need to create instances of my barbells and bars in order to do that
#Exercise Coding
31 messages · Page 1 of 1 (latest)
No code.. I cannot.. do it I have deleted them from anger.
It showed no erros but it did not work.
yeah thats definitely possible
You gotta have 2 animations: One where the player is idle on the bar and one where they do one pushUp
Then you need a script where you detect the proximity prompt being triggered and :PivotTo the player to the correct position, remember to anchor the rootpart, then load the animation on the humanoid's animator, whenever the player clicks send a remote event to do a push up
thats the basics
ight bro welcome to the server
some ppl are chill and some are toxic
One second.. I'll try to get the auto recovery file.
To show you what i wanted to do.
(the idle should be looped)
local ProximityPrompt = script.Parent.ProximityPrompt
local ANIMATION_ID = "17380863163"
local function OnPromptTriggered(player)
local character = player.Character
if not character then return end
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
Instance.new("Animation")
animation.AnimationId = "rbxassetid://" .. ANIMATION_ID
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack:Play()
end
ProximityPrompt.Triggered:Connect(OnPromptTriggered)
Well the Idle is really just standing, I have created one, also the main one ends in the idle so?
yeah make a part where the hrp should be, then in the script you will set hrp cframe to the part
or :PivotTo()
What is hrp?
** You are now Level 1! **
what i mean by hrp is the characters root part
(HumanoidRootPart)
I'll try.
which will be easier I hear about PivotTo() as of now.. umm what should I Do I copy my character's position create a cframe and..?
I'll watch a tutorial
What should I save my new animation as, @hardy niche ?
Like it's priority.. new priority.
I can't do it. Could you please provide me with an example?
ill give you an example tommorow
im so high rn and tired af