Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

"RightHand is not a valid member of Model" ?

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?

16 comments

0

Is this part of the same script I helped you with before?

0

No this is a different animation script

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

0

player is defined as game.Players.LocalPlayer

0

YES EXACTLY, IM USING AN R6 MODEL

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

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.

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.

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.

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

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.

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.

0

Try my new solution

0

I retyped the whole thing and created the trail before I did movement, same results. RightHand is not a valid member of model.

0

Hey, did you ever get this working?

0

No.

1 answer

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.

6 comments

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"

0

oh dang ok

0

@Incinerxte are you sure you didn't forget about the earlier R6/R15 model problem?

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

0

I'll switch to R15 and tell you what happens, brb

0

Nothing, switching to R15 didn't change anything.

This discussion is preserved as it was. New answers, comments, and votes are closed.