Setting the transparency, or destroying part to certain players

Heya! I’m trying to set the transparency, yet I can’t get it to go transparent. Can someone help me with this script?

local badgeService = game:GetService("BadgeService")
local bbadgeID = 1234567890

game.Workspace.BScroll.ProximityPrompt.Triggered:Connect(function(player)
	print("You collected the Builder Scroll")
	workspace.BScroll.Transparency = 1
	if not badgeService:UserHasBadgeAsync(player.UserId, bbadgeID) then
		badgeService:AwardBadge(player.UserId, bbadgeID)
	end
end)
1 Like

Does the print() bit fire? ____________

Not anymore. As soon as I remove the transparency it does.

but… isn’t the transparency bit AFTER the print!? Why does removing the transparency fix it
ahhhhh

1 Like

Is BScroll a Model or a BasePart? If it’s a Model then loop thru it and set every part transparency to 1, or else if there is a single part inside - set it’s transparency.

You may also destroy it if it isn’t needed after being picked up.

image

In the mesh/union is there a UseBasePartColour property or something like it? Idk if it will affect anything but its worth a try

I see.

Try this one.

local badgeService = game:GetService("BadgeService")
local bbadgeID = 1234567890

workspace.BScroll.ProximityPrompt.Triggered:Connect(function(player)
	print("You collected the Builder Scroll")
	workspace.BScroll:Destroy()
	if not badgeService:UserHasBadgeAsync(player.UserId, bbadgeID) then
		badgeService:AwardBadge(player.UserId, bbadgeID)
	end
end)

Thats just deleting though, instead of making it transparent
Then again, it may work for their use-case

OP, does IBlackl’s solution work for you?

(Ill quickly check what happens in studio with union/meshs)

My union/mesh still stays. It doesn’t disappear, anything that will make it disappear for the specific player is fine by me.

Alright, IBlackl’s solution should work for you then!

It doesn’t. Print doesn’t even happen… Reading the output bar rn.

Can you please export the proximity prompt and full script to a roblox model and upload it here?
Im not really sure why it doesn’t work, but it may allow us to see if there is something wrong with the prompt or something, and also to allow us to do fine tuning

I’ll put the link to my test server here!

Oh wait, just noticed you’re using a LocalScript for Proximity. You should use a Script instead.

According to the API page ProximityPrompt, it shouldn’t really matter. Also, they need local script as it should be invisible for only one player

Ok! So is that my problem? I did have a script, but won’t

destory()

remove it for everyone?

Still the issue persists for those who want to use it this way.

BadgeService:AwardBadge only works in a Script. Only the Transparency part has to be in a LocalScript.

Make a Remote to FireClient to a specific player if they pick up the Scroll and set it transparent or destroy.