I’m trying to make a function so that player can hold, animate, or move a sign, like in the video below. I’m not sure what I should exactly do, but I know it’s something to do with CFrame. Does anybody have a suggestion on how I could do this?
By the way, the sign should originally appear on people’s back. It will be pulled to the front of the torso when players need to show their signs.
You’d need to create those specific animations that you want to happen. As for the signs, You’d need to CFrame the sign to be in front of the player, then use the CFrame.Angles function to have it rotate, you can tween it to rotate so it’s a lot smoother.
Oh, but that won’t move the sign right? If I just rotate the sign on the player’s back, then it stays behind?
Can you give me a sample code? I’ve thought of this.
for i, v in pairs (game:GetPlayers()) do
local positionBack = v.Character.HumanoidRootPart - (the distance, I'm not sure how to use CFrame here)
local positionFront = same thing as before
local TweenInfo = tweeninfo here
Tween:play()
end
for i, v in pairs (game:GetPlayers()) do
local positionBack = v.Character.HumanoidRootPart.CFrame * CFrame.New(0,0,-1) -- Change the value based on the XYZ axis to fit properly, this is psuedo code.
local positionFront = v.Character.HumanoidRootPart.CFrame * CFrame.New(0,0,1) -- read above comment
local TweenInfo = tweeninfo here
Tween:play()
end
You’d first want to position the sign in front of the player, then do the tween.
Won’t CFrame.new represent Vector 3 of the position instead of rotation? How would I also include the rotation? I’m new to CFrame so I don’t quite get it.
Couldnt he just animate the sign with the player, just add the sign object into the player model, and create a custom animation, just have to add it to the rig.
That method doesn’t have to be tool-only. You just have to clone/create the sign and attach it to a Motor6D like the one used in the animation, then play the animation with the sign.
It’s just used for tools because its a good and easy method.