I encountered a issue while trying to Weld a part to another.
For some reasson, when i create a weld via script and set both parts, weld still inactive, even when Part1 is unanchored, when i change to server side and try setting the Part1 to the same Part it suddenly works and weld is set to active, which dosent make any sense.
if not Player or not Object or not Tile then return end
if Player:FindFirstChild("Coins").Value < Object:GetAttribute("Price") then return end
Player:FindFirstChild("Coins").Value -= Object:GetAttribute("Price")
Tile:AddTag("Ocuppied")
local NewClone = Object:Clone()
NewClone.Parent = Tile
NewClone.PrimaryPart.CFrame = Tile.CFrame * CFrame.new(0,1,0)
local Weld = Instance.new("WeldConstraint", Tile)
Weld.Enabled = true
Weld.Part0 = Tile
Weld.Part1 = Object.PrimaryPart
warn(Weld.Active)*emphasized text*
if not Player or not Object or not Tile then return end
if Player:FindFirstChild("Coins").Value < Object:GetAttribute("Price") then return end
Player:FindFirstChild("Coins").Value -= Object:GetAttribute("Price")
Tile:AddTag("Ocuppied")
local NewClone = Object:Clone()
NewClone.Parent = Tile
NewClone.PrimaryPart.CFrame = Tile.CFrame * CFrame.new(0,1,0)
local Weld = Instance.new("WeldConstraint", Tile)
Weld.Enabled = true
Weld.Part0 = Tile
Weld.Part1 = Object.PrimaryPart
warn(Weld.Active)