So basically, when somebody clicks a textbutton, I want it to clone a dance floor from serverstorage and make a red-tinted screen. This should be on the server, I don't want it to be on one client. Here is the script I put below inside the textbutton (in a ServerScript)
function onClicked() game.ServerStorage.DanceFloor:clone().Parent = workspace local color = Instance.new('ColorCorrectionEffect', game.Lighting) color.TintColor = Color3.fromRGB(255, 172, 172) end script.Parent.MouseButton1Down:connect(onClicked)
In studio, it works. But in the game, it doesn't. I know most guis are powered from LocalScripts, but this is supposed to affect everyone so I tried a regular Script. What did I do wrong? How can I fix this?
The type of script does not relate to who the script effects. In order for the MouseButton1Down
event to work, I believe you will need to be using a LocalScript. The rest of the code should work fine if filteringenabled is OFF, although if it's on then this will only affect the local player.
You can bypass this by using remoteevents, although that's a whole new question entirely.