On my game, the server-side cant access something a localscript instance.new'ed into it.
As you mentioned in a comment, the point lite script should be provided.
A simple explanation for why the the Server cannot locate the object in ReplicatedStorage is because the LocalScript only affects the Client's game.
To create an object in the ReplicatedStorage during a game, you need to fire a ServerEvent that creates the part in the ReplicatedStorage.
Here is an article on how to send Client to Server events:
developer.roblox.com/en-us/articles/Remote-Functions-and-Events
I hope this can help.
It sounds like you're creating something on a local script and not understanding why the server can't see it. You would need to use RemoteEvents.
in your local script you would have:
at the beginning of the script:
local RepStorage(game:GetService("ReplicatedStorage") local PointLightEvent = RepStorage:WaitForChild("PointLightEvent")
when the f key is pressed:
PointLightEvent:FireServer()
in a new server script:
local RepStorage(game:GetService("ReplicatedStorage") local PointLightEvent = Instance.new("RemoteEvent",RepStorage) PointLightEvent.Name = "PointLightEvent" PointLightEvent.OnServerEvent:Connect(function(player) local pointlight = (PointLightHere) -- replace (PointLightHere) with wherever your pointlight is, if it is held by a player you would do something like player.Character.Flashlight.Part.PointLight pointlight.Enabled = not pointlight.Enabled end)
This is not great code, but it should fix your problem. If there are any issues, let me know, though I might be going to sleep soon. I also recommend doing a bit of research on RemoteEvents.