Problem
My script is, when the player joins it gets a part inside the workspace and welds it into the player. This works in studio but not in game. I've used FireClient so send code to Server to client but it doesn't work. What am I doing wrong?
LocalScript:
local Players = game:GetService('Players')
local Player = Players.LocalPlayer
local char = Player.Character
local LeftArm = char.Torso
game.ReplicatedStorage.DoDun.OnClientEvent:Connect(function(Part)--Get the RemoteEvent
print("hoolio")
Part.CFrame = LeftArm.CFrame * CFrame.new(-5,0,0)
local weld = Instance.new("Weld")--Welds it to left arm -5 on the x scale
weld.Part0 = LeftArm
weld.C0 = LeftArm.CFrame:inverse()
weld.Part1 = Part
weld.C1 = Part.CFrame:inverse()
weld.Parent = Part
print("ok")
Part.Anchored = false
Part.CanCollide = false
print("non")
end)
Server Script
game.Players.PlayerAdded:Connect(function(Player)--Get the player when joines
local Part = game.ReplicatedStorage.Part:Clone()--Clones the part
Part.Parent = workspace
game.ReplicatedStorage.DoDun:FireClient(Player, Part)--FireClient with the RemoteEvent
end)

4 comments
Make the weld on the server
That'll be client to server...
Filtering Enabled basically means that the server will not trust anything the player does except movement. As you're attempting to make the changes from a local context the server doesn't trust it. I would advise you flip the scripts so that the welds are being made on the server instead, as for your code, it should work fine as soon as you make the weld on the server
I wish I could downvote comments. That is acceptable the weld would only show for the player...