Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

"RightHand is not a valid member of Model" ?

Asked by 5 years ago

Animation works, but DashTrail isn't appearing because apparently "RightHand is not a valid member of Model." Same with RightLowerArm, LeftHand, and LeftLowerArm.

Script:

local RepStore = game:WaitForChild("ReplicatedStorage")
local Store = RepStore:WaitForChild("Storage")
local RemoteStore = Store:WaitForChild("RemoteEvents")
local Remote = RemoteStore:WaitForChild("FDashEvent")


Remote.OnServerEvent:connect(function(player, printtext)


local Anim = Instance.new("Animation")
Anim.AnimationId ="rbxassetid://2667894858"                    --Put Animation Here
local move = player.Character.Humanoid:LoadAnimation(Anim)
move:Play()



local position = Instance.new("BodyVelocity",player.Character.HumanoidRootPart)
position.MaxForce = Vector3.new(5000000,5000000,5000000)
position.P = 50
position.Velocity = player.Character.HumanoidRootPart.CFrame.LookVector * 40
    game.Debris:AddItem(position,.5)   



local T1 = game.ReplicatedStorage.Storage.Trails.DashTrail:Clone()
T1.Parent = workspace
local attachment0 = Instance.new("Attachment",player.Character.RightHand)
 attachment0.Name = "TrailAttachment0"
local attachment1 = Instance.new("Attachment",player.Character.RightLowerArm)
 attachment1.Name = "TrailAttachment1"
T1.Attachment0 = attachment0
T1.Attachment1 = attachment1
local T2 = game.ReplicatedStorage.Storage.Trails.DashTrail:Clone()
T2.Parent = workspace
local attachment02 = Instance.new("Attachment",player.Character.LeftHand)
 attachment02.Name = "TrailAttachment0"
local attachment12 = Instance.new("Attachment",player.Character.LeftLowerArm)
 attachment12.Name = "TrailAttachment1"
T2.Attachment0 = attachment02
T2.Attachment1 = attachment12



    wait(0.6)
    T1:Destroy()
    T2:Destroy()



    attachment0:Destroy()
    attachment1:Destroy()
    attachment02:Destroy()
    attachment12:Destroy()







end)

=====================================================================================================================================================

Any help?

0
Is this part of the same script I helped you with before? SteamG00B 1633 — 5y
0
No this is a different animation script Incinerxte 2 — 5y
0
Alright so I deleted that answer because my understanding of the problem was wrong, the problem may be that you are looking for those parts on a body that isn't a r15 model SteamG00B 1633 — 5y
0
player is defined as game.Players.LocalPlayer Incinerxte 2 — 5y
View all comments (12 more)
0
YES EXACTLY, IM USING AN R6 MODEL Incinerxte 2 — 5y
0
Any ideas on how to fix it if I'm using an r6 model? I didn't know those parts were only on R15 models Incinerxte 2 — 5y
0
You could check for a player's rig version and only trigger those animations if they have the correct rig. Or you could force everyone to only use the R15 rig. SteamG00B 1633 — 5y
0
Actually I don't think that's the problem because the parts ''RightArm'' and ''LeftArm'' are on both r15 and r6 models. But ''LowerLeftArm'' and ''LowerRightArm'' are not so I'm confused. Incinerxte 2 — 5y
0
Well according to your question, RightArm and LeftArm work, but LowerLeftArm and LowerRightArm do not. I think you might be confusing yourself, so my advice to you right now is to take a break from this, go make some tea or whatever, and then come back and try to figure out what is going on. SteamG00B 1633 — 5y
0
I have a possible solution, I'm going to answer your question with partial code until I can figure out the parts that I am not familiar with SteamG00B 1633 — 5y
0
None of them work, RightArm, LeftArm, LowerLeftArm, and LowerRightArm. But you're right I just should just take a break for now. Thanks for all your help. Incinerxte 2 — 5y
0
Oh also just realized another thing that is a problem, you're going to want to create the trail before you do any movement, otherwise it's going to move, then the trail will appear unmoving and then disappear. SteamG00B 1633 — 5y
0
Try my new solution SteamG00B 1633 — 5y
0
I retyped the whole thing and created the trail before I did movement, same results. RightHand is not a valid member of model. Incinerxte 2 — 5y
0
Hey, did you ever get this working? SteamG00B 1633 — 5y
0
No. Incinerxte 2 — 5y

1 answer

Log in to vote
0
Answered by
SteamG00B 1633 Moderation Voter
5 years ago
Edited 5 years ago

I finally figured out your problem, while it might have been the fact that you were using an r6 model the first time, that was not the only problem.

local attachment0 = Instance.new("Attachment",player.Character.RightHand)

should be

local attachment0 = Instance.new("Attachment",player.Parent["Right Hand"])

because there are spaces in the name

Edit: might be that player points to the humanoid of player? So it would be player.Parent instead of player.Character.

0
I appreciate the fact you put an hour looking into my problem but, sadly that's not it. I used your script, the one with spaces and instead of the error being "RightHand is not a valid member of model", it's turned into "Right Hand is not a valid member of Model" Incinerxte 2 — 5y
0
oh dang ok SteamG00B 1633 — 5y
0
@Incinerxte are you sure you didn't forget about the earlier R6/R15 model problem? SteamG00B 1633 — 5y
0
it should know what player is because the animation worked, so I don't know why it's not able to find Right Hand other than if you forgot to switch to R15 again SteamG00B 1633 — 5y
View all comments (2 more)
0
I'll switch to R15 and tell you what happens, brb Incinerxte 2 — 5y
0
Nothing, switching to R15 didn't change anything. Incinerxte 2 — 5y
Ad

Answer this question