All Highlights Changing From One Script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    Only the local highlight changing, and not all of them. There are two identical scripts, but they are in different Models.

  2. What is the issue?
    All of the highlights are changing from one script. It only sometimes happens. I won’t change anything before running again, and it will either work or wont.

I’ll click on one of the Cases, and it will either flicker between both Model’s Highlights, or it will just use the one Highlight. This issue seems to fix itself when I run the game inside of Roblox, instead of Studio.

  1. What solutions have you tried so far?
    I looked on google and these forums, but couldn’t find anything.

Here is the script:

script.Parent.Case.ClickDetector.MouseClick:Connect(function(Plr)
	if script.Parent.Case.BillboardGui.Enabled == true then
		script.Parent.Highlight.OutlineColor = Color3.new(1, 0, 0)
		script.Parent.Highlight.OutlineTransparency = 0
		script.Parent.Highlight.FillTransparency = .75

		local Sound = script.Parent.Case.Unavalable:Clone()
		Sound.Playing = true
		Sound.Parent = script.Parent.Case

		wait(1.2)
		Sound:Destroy()
	else
		script.Parent.Highlight.OutlineTransparency = 0

		local Sound = script.Parent.Case.Beep:Clone()
		Sound.Playing = true
		Sound.Parent = script.Parent.Case

		Plr.leaderstats.Gun.Value = script.Parent.Name

		wait(1.2)
		Sound:Destroy()
	end
end)

game["Run Service"].Stepped:Connect(function()
	script.Parent.Highlight.OutlineTransparency += .03
	script.Parent.Highlight.FillTransparency += .015
end)

I know it’s messy, sorry. :disappointed:

And here is the explorer:


The Rok’s Billboard is active. The Default’s Billboard is not.

I couldn’t get a video working, sorry.

Thanks in advance!

1 Like