Union Transparency help

Does anyone know why the transparency isnt working for this union?
I want it to go transparent with the script but i just keep getting this error:

1 Like

The error message says ‘Transparency is not a valid member of Model’ meaning you cannot set the Transparency of a Model.

1 Like

Could you show what you did on the script?

1 Like

It isnt a model, it thinks its a model though

It says you are trying to change the Transparency of a Model:

2 Likes

i have no idea why, i know its a union though because thats the same name as the union

show us the explorer and the path.

Is the Union placed inside of the Model?

1 Like

‘’'elseif eggpart:IsA(“Model”) then

		local p = Instance.new("ProximityPrompt")
		p.Parent = eggpart.PrimaryPart
		p.RequiresLineOfSight = false

		p.Triggered:Connect(function(playerwhotriggered)
			if playerwhotriggered == game.Players.LocalPlayer then
				eggpart.Transparency = 1
				p.Enabled = false
				queststufffolder.Events.Local_ItemCollected:FireServer(eggpart.Name, 1)
			end
		end)
		
	end 
end'''

the primarypart is the union

so is the eggpart a model or not?
could you also show explorer and path like @Frostilism said?

huh

why are you using the same variable to detect if eggpart is a model and to set transparency. if its a model then it cant be set its transparency.

2 Likes

ah i see what i did, yea rightt

Exactly what I have said in first post.

Do this if the eggpart is a model.

local p = Instance.new("ProximityPrompt")
p.Parent = eggpart.PrimaryPart
p.RequiresLineOfSight = false

p.Triggered:Connect(function(playerwhotriggered)
	if playerwhotriggered == game.Players.LocalPlayer then
		for i,v in pairs(eggpart:GetChildren()) do
			if v:IsA("Part") or v:IsA("BasePart") then
				v.Transparency = 1
			end
		end
		p.Enabled = false
		queststufffolder.Events.Local_ItemCollected:FireServer(eggpart.Name, 1)
	end
end)

end 
end''
1 Like

thank you! sorry for the trouble’s

yea i didnt really code it and the names were quite similar

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.