woitur
(Koala)
December 22, 2022, 10:20pm
#22
game:GetService("Players").PlayerAdded:Connect(function(plr)
local PlayerStats = Instance.new("Folder")
PlayerStats.Name = "PlayerStats"
PlayerStats.Parent = plr
local Inventory = Instance.new("Folder")
Inventory.Name = "Inventory"
Inventory.Parent = plr
local function weld_torch(character)
local ClonedTorch = Torch:Clone()
local LeftHand = character:WaitForChild("LeftHand")
local Weld = Instance.new("Weld")
Weld.Parent = LeftHand
Weld.Part0 = LeftHand
Weld.Part1 = ClonedTorch.PrimaryPart
Weld.C0 = CFrame.Angles(math.rad(-90), 0, 0) + Vector3.new(0, -0.15, -0.5) --offset (vector3)
print(character.Name, "torch cloned, welded, BUT NOT PARENTED YET")
ClonedTorch.Parent = LeftHand
print("TORCH 100% COMPLETED")
print("torch position", ClonedTorch.PrimaryPart.Position)
print("lefthand position",LeftHand.Position)
end
if plr.Character or plr.CharacterAdded:Wait() then
weld_torch(plr.Character)
end
plr.CharacterAdded:Connect(function(character)
weld_torch(character)
thats the new code (the full code of changing weldconstraint to weld)
For another method of debugging, test in studio again, but this time, look in the character’s descendants in the explorer tree of the one who doesn’t have it, and then find it by selecting the transform tool or the scale tool so u know where it is (you’ll have to look around to see where it is).
woitur
(Koala)
December 22, 2022, 10:31pm
#24
lemme try it again (cuz I already did that) and it worked for clones of ME
it works in studio fine, but in game, it doesnt for other players except me
woitur
(Koala)
December 22, 2022, 10:35pm
#25
it works fine in studio as you see
when u say “in game”, do u mean when you play it live?
did you write it in a local script?
woitur
(Koala)
December 22, 2022, 10:50pm
#29
no, its a serverscript.
torch is stored inside serverstorage
woitur
(Koala)
December 22, 2022, 11:15pm
#30
okay, I managed to add my alt in teamcreate to see the issue.
The issue is the torch doesn’t get parented OR cloned because I cannot find it in lefthand like it should
local function weld_torch(character)
local ClonedTorch = Torch:Clone()
local LeftHand = character:WaitForChild("LeftHand")
local Weld = Instance.new("Weld")
Weld.Parent = LeftHand
Weld.Part0 = LeftHand
Weld.Part1 = ClonedTorch.PrimaryPart
Weld.C0 = CFrame.Angles(math.rad(-90), 0, 0) + Vector3.new(0, -0.15, -0.5) --offset (vector3)
print(character.Name, "torch cloned, welded, BUT NOT PARENTED YET")
ClonedTorch.Parent = LeftHand
print("TORCH 100% COMPLETED")
print("torch position", ClonedTorch.PrimaryPart.Position)
print("lefthand position",LeftHand.Position)
end
if plr.Character or plr.CharacterAdded:Wait() then
weld_torch(plr.Character)
end
plr.CharacterAdded:Connect(function(character)
weld_torch(character)
here is the script
woitur
(Koala)
December 22, 2022, 11:19pm
#31
for my main account, it does get cloned and parented