So I've created a script so when a player says !nosnow it disables snow for them only and not anyone else. When I test it I get no errors and nothing happens. What did I do wrong?
Here's what is in my server script (which is in serverscriptservice):
local rs = game:GetService("ReplicatedStorage")
local event = rs:WaitForChild("NoSnow")
local event2 = rs:WaitForChild("Snow")
function onChatted(msg, speaker)
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if msg == "!nosnow" then
event:FireClient(speaker)
elseif msg == "!snow" then
event2:FireClient(speaker)
end
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg) onChatted(msg, player) end)
end)
Here's what is in my local script (which is in workspace):
local rs = game:GetService("ReplicatedStorage")
local event = rs:WaitForChild("NoSnow")
local function onEventFired()
game.Workspace.Snow.Snow1.ParticleEmitter.Enabled = false
game.Workspace.Snow.Snow2.ParticleEmitter.Enabled = false
end
event.OnClientEvent:Connect(onEventFired)

3 comments
simple answer: local scripts will not work in the workspace.
where do i put it then?
in the starter scripts