Recently, I've been scripting a lot. However, I've been noticing that some of my scripts will work in studio; however, they fail to work in the actual game. For example:
game.StarterGui:SetCore("SendNotification", { Title = "x"; Text = "x"; Icon = "http://www.roblox.com/asset/?id=3314656170"; })
That script works perfectly fine in-studio but on the actual game it does not work. May someone explain why Filter Enabled is affecting my scripts?
i know this has been answered like 3 times already, but im gonna add to the competition
FE is a basic form of an anti - exploit feature that most online games endorse the concept of. It basically rejects any client from changing any server - side values; put even simpler, the client cant make any direct changes to a game. For instance, if i decided that i want to place a part in the workspace via a client side script, the part would show for the player in which the client - side script was on, but not for anyone else. This is because the server did not accept that input coming from a client - side script and thus, it did not replicate what the client - side script did, which was, to place a part, to other clients on the server(the basis of roblox studio is client - side btw, to make life easier for everyone). To know why this is so u need a some rough background knowledge of client - server architecture, which is:(ill get a snippet from wiki)
A computing model in which the server hosts, delivers and manages most of the resources and services to be consumed by the client. This type of architecture has one or more client computers connected to a central server over a network or internet connection(most important thing u need to know if u didnt already). All the requests and services are delivered over a network.
Now that u know(hopefully) what FE does, u might be wondering why it can prevent most exploits. That is because the majority of exploits can only work with client - side resources(save, for some extreme hypothetical cases), and since the server blocks the client from performing any direct change to the server by default, most abnormal inputs made by the exploiter will not reach the server to get replicated to other clients. That being said, the client can still change the server, and exploiters can still have it their way. Noticed how i said any client - side script cannot (directly) change the server; The client - side script can still (indirectly) change it. Remote events for example, are server - side functions in which the client script can communicate to, and u can get them to mess with the server if arranged correctly. This can work for both the better and worse, as it is both the grounds where users get to actually play and interact with other clients and portals where exploiters can enter through and destroy the ecosystem of ur game, so u would have to take certain precautions when implementing them.
Use a remote event to fire this. If this is in a local/server script that's why its not working.
SERVER SCRIPT
local SendNotification = game:GetService("ReplicatedStorage").SendNotification SendNotification:FireAllClients()
LOCAL SCRIPT
local SendNotification = game:GetService("ReplicatedStorage").SendNotification function onSentNotification() game.StarterGui:SetCore("SendNotification", { Title = "x"; Text = "x"; Icon = "http://www.roblox.com/asset/?id=3314656170"; }) end SendNotification.OnClientEvent:Connect(onSendNotification)
It just lets you use commands and enums that were from old roblox versions