Hello! I have two copies of a very simple script with only a few variables changed. One works as expected, but for some reason the other one outputs “The current thread cannot use ‘ToggleLight’ (lacking capability Unassigned)”. I’ve never encountered this before and any topics that i’ve found on this error were dealing with module scripts.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ToggleLight = ReplicatedStorage.RemoteEvents.ToggleLight
local lamp = script.Parent.Lamp
local light = script.Parent.Bulb.PointLight
lamp.ClickDetector.MouseClick:Connect(function(player)
ToggleLight:FireClient(player, light, lamp.Click)
end)
Basically what happened is that Roblox added a feature to limit the capabilities of scripts because they have the potential of being harmful. Especially if you’re using scripts from the toolbox which have been know to have backdoors and other harmful pieces of code.