I am trying to make a server script do things only locally. Is this possible and how I could do it? I have already tried to put local at function parts of a script but it seems to not work.
COMMUNITY QUESTION
How can I make a server script do stuff only locally?
1 answer
For a serverscript itself to do things locally, no it's not possible. It runs on the server and anything it does replicates.
There are several workarounds like what HappyTimIsHim stated :FireClient() , or just flat out use a localscript.
Local is mostly used to create variables in the context of the line.
What i mean by context of the line:
local var1 = "yay"
if var1 = "yay"
local var1 = "sad"
print(var1) -- returns sad
end
print(var1) -- Returns yay
Example 2:
local var1 = "yay"
if var1 = "yay"
var1 = "sad"
end
print(var1) -- Returns sad
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Why do you need to use a server script to do this? Why not just use a LocalScript?
u can use a remote event and fireclient