Alright so I have a LocalScript (in ServerScriptService) that’s supported to make a set of parts with text on them appear to a specific person, but the script just does not work. There are no errors that are thrown so I don’t really know why. The script runs when a RemoteEvent receives a Client triggered by an Admin Command. If you need me to elaborate more, just ask
Script:
function Run(arg)
if arg == "off" then
for i, v in pairs(workspace:GetChildren()) do if v.Name == "TableNum" then
v.Transparency = 1
v.SG.Enabled = false
end end
elseif arg == "on" then
for i, v in pairs(workspace:GetChildren()) do if v.Name == "TableNum" then
v.Transparency = 0
v.SG.Enabled = true
end end
end
end
game.ReplicatedStorage.Restaurant.TableCount.OnClientEvent:Connect(Run)
Your post is missing some information: Are there any errors in the output? Where did you parent the LocalScript? Does the command from the server script actually run? Show the code from the server script with the execution of the command. You can try using print functions in both scripts to see if they’re running fine
Function = function(plr,args) -- Function to run for command
local set = string.lower(args[1])
if set == "off" then
game.ReplicatedStorage.Restaurant.TableCount:FireClient(plr, "off")
elseif set == "on" then
game.ReplicatedStorage.Restaurant.TableCount:FireClient(plr, "on")
else
error("Invalid Entry")
end
end
```
LocalScripts can’t run in ServerScriptService, hence the name ServerScriptService, which is intended to be where you would house ServerScripts. Here’s some places where local scripts can run:
Thank you! I just put it in there in confusion because I didn’t exactly know the whole thing worked. Turns out A Player’s PlayerScripts is the appropriate place to put it