script.Parent.ClickDetector.MouseClick:Connect(function(player)
local take = script.Parent.Parent.Taken
if take.Value == 'false' and script.Parent.Parent.Anim.Value == 'false' then
take.Value = 'true'
local box = script.Parent.JobBox:Clone()
box.Anchored = false
box.Parent = workspace:FindFirstChild(player.Name).RightHand
local weld = Instance.new('Weld')
weld.Parent = box
weld.Part0 = box
weld.Part1 = workspace:FindFirstChild(player.Name).RightHand
weld.C0 = CFrame.new(1,0.5,0)
script.Parent.Parent.Anim.Value = 'true'
local char = workspace:FindFirstChild(player.Name)
local flip = Instance.new("Animation")
flip.AnimationId = "http://www.roblox.com/asset/?id=03571563488"
flip.Parent = char
local animloader2 = char.Humanoid:LoadAnimation(flip )
animloader2:Play()
script.Parent.Parent.Owner.Value = player.Name
while(1) do
wait(1)
if script.Parent.Parent.Anim.Value == 'false' then
animloader2:Stop()
end
end
end
end)
✓ ANSWER ACCEPTED
How can I make this script's compability to be changed from R15 to R6 between the Lines in 7 and 12?
1 answer
✓ Accepted answer
I would suggest using a different method to get the player's character, like
player.Character but anyway, the only thing you need to change for the RightHand is change it to "Right Arm".
workspace:FindFirstChild(player.Name)["Right Arm"]
or
player.Character:FindFirstChild("Right Arm")
And yes, there is a space between Right and Arm.
https://developer.roblox.com/en-us/articles/roblox-avatars
If you wanted it to be compatible with both R15 and R6, you could just use the or condition.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
is this not already compatible with r6?
Obviously not, As there is no RightHand in a R6 rig