I have a script which doesn't work. Now I'm asking

Does anyone know how I can make it so the player holds a rope when he sits on a horse?

How do I make it so when a player sits on a horse. When a part becomes visible?

Make the rope a tool and equip it.

But I want the player to hold other tools.

Are they holding the rope and a tool at the same time?

Ex: the hold the rope. When they have the tool out then there other hand is on the tool.

Load a dummy into Roblox.

Put your rope in the hand of the dummy where you want it.

Duplicate the hand and make it part of your rope model.

Make the hand the Primary Part of the rope model

Delete the Dummy.

Clone the Rope model and add it to a player when they sit on the horse.

Make the CFrame of your rope the CFrame of the players hand and weld it to the hand.

Destroy the rope when you no longer need it.

How do CFrames work? I do not understand how to use them.

local ropeClone = rope:Clone()
ropeClone.CFrame = hand.CFrame

You can find info on using CFrames and Welds here on the forum.

The above is just an example.

1 Like

Oh, okay. I will reply back once I have done this. I will reply latter. Thank you bro!

No problem.

It helps to write out what you want to do before you do it.

Then just look up instructions for each part of what you want to do.

To make a player character hold a rope while sitting on a horse in Lua using Roblox, you can use a combination of the Animation Controller and attaching a rope object to the character’s hand. Here’s an example of how you can achieve this:

  1. Create a rope object in the workspace. You can do this by going to the Insert tab and selecting the “Rope” object under “Tools”.

  2. Attach the rope to the character’s hand. You can do this by accessing the character’s “RightHand” property and setting it as the rope’s parent. For example:

local character = game:GetService("Players").LocalPlayer.Character
local rightHand = character:WaitForChild("RightHand")
local rope = workspace.Rope

rope.Parent = rightHand

  • Create an Animation Controller for the character. You can do this by going to the “Explorer” tab, right-clicking the character’s humanoid object, and selecting “Create Animation Controller”.

  • Create an animation for the character holding the rope. You can do this by going to the “Animation Editor” tab and creating a new animation clip. You can then animate the character holding the rope in this clip.

  • Add the animation to the Animation Controller. You can do this by selecting the Animation Controller in the “Explorer” tab and dragging the animation clip into the “Animations” folder.

  • Set the animation to play when the character is riding a horse. You can do this by detecting when the character is sitting on a horse and playing the animation. For example:

local horse = workspace.Horse -- replace "Horse" with the name of your horse object
local rider = horse:WaitForChild("Rider")
local animationController = rider:WaitForChild("AnimationController")
local ropeAnimation = animationController:LoadAnimation(script.Parent.RopeAnimation) -- replace "RopeAnimation" with the name of your rope animation clip

local function onSeatPartEntered(otherPart)
    if otherPart.Parent == horse and otherPart.Name == "Seat" then
        ropeAnimation:Play()
    end
end

local function onSeatPartExited(otherPart)
    if otherPart.Parent == horse and otherPart.Name == "Seat" then
        ropeAnimation:Stop()
    end
end

horse.SeatPart.Touched:Connect(onSeatPartEntered)
horse.SeatPart.TouchEnded:Connect(onSeatPartExited)

In this example, we detect when the character’s seat part touches the horse’s seat part, and we play the rope animation. When the seat part is no longer touching the horse’s seat part, we stop the animation.

Note that this is just one way to achieve this effect, and there may be other methods or variations that work better for your specific project.

1 Like

Broc an you help me with my cash value glitch?