So i need this part to change properties once it spawns into the map. It cant change before this because it is not in the map yet. But I dont know how to get the game to detect when it spawns pls help.
function boi()
local point = 0
local part = script.Parent.friendgirl
print("wat da fac")
point = point + 1
if point == 1 then
part.Transparency = 0.5
part.CanCollide = false
end
end
script.Parent.friendgirl.Touched:Connect(boi)
(PROPERTY CHANGE CODE)( DOESNT WORK)
local fucc = script.Parent.spawnm
fucc.MouseButton1Click:Connect(function(hi)
print("HI")
local noboi = Instance.new("Part", game.Workspace)
noboi.Name = "friendgirl"
noboi.Size = Vector3.new(6,2,6)
noboi.Position = Vector3.new(25,37,43)
noboi.Anchored = false
noboi.BrickColor = BrickColor.Random()
noboi.Material = "Neon"
end)
PART SPAWN CODE (WORKS)
