i'm trying to make my game and my script is not working i'm trying to make it so it makes the mask invisible as a text button and also i want other people to see it so i'm using a server script code is here: script.parent.MouseButton1Click:Connect(function() game.Workspace.Helmet.Mask.Transparency = 0 end
You cant use mouseButton1Click on the server.
Do the mouse click on the client, then fire a remote event to the server, then make a function for setting the Helmet transparency to 0 (or 1)
Example
client
local event = path_to_your_event button.MouseButton1Down:Connect(function() --could add a simple debounce here event:FireServer(1) --we are going to fire 1 as the argument end)
server
local event = path_to_your_event local helmet = path_to_helmet --we are going to make sure given transparency is a number so we add the :number local function setHelmetTransparency(Player, givenTransparency: number) --player is the player that fired the event --givenTransparency is the number we passed as an argument on the client helmet.Transparency = givenTransparency end event.OnServerEvent:Connect(setHelmetTransparency) --this is how we receive remote events on the server