New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
1

M39a9am3R 3176
5 years ago

The transparencies are working fine, it's just that whenever I click the button it will kill me (at least right now I know how to make a reset button). Can anyone find my problem?

local nameshowing=true
local plr=script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
local shouldhidename = true
if nameshowing == true then
shouldhidename = true
else shouldhidename=false
end
if shouldhidename==true then
if plr.Character ~=nil then
nameshowing = false
end
end
else
nameshowing=true
end
end)


Any help will be appreciated, thanks for your time.

### Locked by M39a9am3R, adark, SanityMan, and TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

4

Why did you make a script inside another thing? You need to create a LocalScript in some storage service, then clone it in the playergui and execute the function in your mouse script, kinda like this:

_G.hideBillboard = function()
local player = game.Players.LocalPlayer
local weld = Instance.new("Weld")
end

_G.unhideBillboard = function()
-- Opposite of hideBillBoard()
end


After you can call those method outside everything:

function onMouseClick()
-- I suppose that you have a boolean called "hidden" that checks if the game needs to hide/unhide the billboard
if hidden then
_G.unhideBillboard()
else
_G.hideBillboard()
end

0
The script is inside the button inside a screengui, inside the startergui, which is inside the player so there are four parents. I think my problem here is the welds. But does it need to be inside a localscript in order for it to work? M39a9am3R 3176 — 5y
0
I edited the message alessandro112 171 — 5y
0
Just moved my code to a LocalScript, thank you. M39a9am3R 3176 — 5y
0
No problem ;) alessandro112 171 — 5y
-1

Would it have been possible to rename your humanoid to nothing so the name doesn't show up? Just wondering.

0
No, it is not possible. Since your character is connected to your player I guess that makes your character's name ROBLOX locked, since I've tried changing it in two ways in studio one being script and the other being through properties with no change. M39a9am3R 3176 — 5y
0
Ok thanks! Mind checking my most recent question? Champion121212 22 — 5y