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

Radio not equipping to player?

Asked by 8 years ago
return function(player)
    local function weldBetween(a, b)
    local weld = Instance.new("ManualWeld")
    weld.Part0 = a
    weld.Part1 = b
    weld.C0 = CFrame.new()
    weld.C1 = b.CFrame:inverse() * a.CFrame
    weld.Parent = a
    return weld;
    end
    local char = player.Character 
    local hand = game:GetService("ReplicatedStorage"):WaitForChild("Radio"):Clone()
    hand.Parent=char
    hand.CFrame=char:WaitForChild("Torso").CFrame*CFrame.new(Vector3.new(0,0,1))*CFrame.Angles(0,math.rad(180),math.rad(45))
    weldBetween(char:WaitForChild("Torso"), hand)
    hand.CanCollide=true
    hand.Anchored=false
    hand:WaitForChild("Radio").Parent=player:WaitForChild("PlayerGui")
end

Radio is in 'ReplicatedStorage'

This script (ModuleScript) is in ServerScriptStorage. What's the problem?

PS The LinkedSource is Embedded

Answer this question