Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Scripts do not work in the game but in the studio already?

Asked by 5 years ago
Edited 5 years ago

Hello i've got a problem i have a game that is uncopylocked but when i copied it... the scripts aren't working in the game... but in studio they are working how can i fix that?

game (copied by me): https://www.roblox.com/games/2161540032/CB-S original game link (same problem): https://cdn.discordapp.com/attachments/384550340822827018/474288413458169866/altered.rbxl

Output: a)In game:

https://imgur.com/OJJObyG

b)In studio

https://imgur.com/asTfGdi

Edit: Scripts have not worked since the update of roblox

0
the title was to be the affirmative... PolskiKrystian9358 9 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

Filtering Enabled Filtering enabled at it's most base form is a disconnection between the Client and the Server. The client side of a game uses Local Scripts as well as Module Scripts, while the server side uses Scripts and Module Scripts. A Local Script will NOT work on the server side. Also as a side note you cannot use game.Players.LocalPlayer in a Script, it only works in Local Scripts. When Filtering Enabled is active, you cannot change anything on the server side from the client side, and you cannot change anything on the client side from the server side.

Server - Client Communication In order for the server and client to communicate, you need to use RemoteEvents and RemoteFunctions (link found at bottom). These allow you to talk between the two sides by passing information and data back and forth. Note that you cannot pass any Instances between the functions only Booleans, Numbers, Strings, Tables, Vectors, CFrames, and a few others, but those are the most commonly used. Futher on RemoteEvents and RemoteFunctions - RemoteEvents fire an event to one of the two sides passing values, but not returning anything. RemoteFunctions on the other hand pass values, and also return a value.

Quick Note RemoteFunctions and RemoteEvents are most commonly placed in the ReplicatedStorage since it is shared by both the Server and the Client, so both are able to see it and use it.

Ex. I cannot create a part and move it on the client side, it would only replicate for the one client - not the entire game.

Client You are a client, all players are considered clients. Each client has their own version of the game. Anything that happens on the client side of things does NOT replicate to the other clients or the server (aside from things like player owned physics, that replicates).

Client Sided Examples: ReplicatedFirst, PlayerGui, ReplicatedStorage

Server The server own it's own copy of the game, anything that happens on the server is replicated to all clients, meaning every person in the game will be able to see it.

Server Sided Examples: ServerScriptService, ServerStorage, ReplicatedStorage

In Terms of Security Anything on the client side can be looked at and taken by exploits. Since the client creates it's own version of the game, they can do whatever they want with it. That is why it's extremely important that you don't keep any important information on the client side.

Ex. If I had a Module Script on the client side that gave players money. An exploiter could look at that Module Script, determine which function you're using inside the module script as well as what parameters it takes, and then utilize it to give their self money.

Helpful Links

https://wiki.roblox.com/index.php?title=API:Class/Workspace/FilteringEnabled https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events http://robloxdev.com/articles/Experimental-Mode

Ad
Log in to vote
0
Answered by 5 years ago

Put your script into a LocalScript.

Answer this question