It is a simple question but I am unable to fine answer. For reference, I have two local scripts, one to enable/disable the other and the other is the script that actually does things. In my case, I have an X-Ray vision type thing but what I want to do is make it so that I can enable and disable it by running the script to enable/disable it if that makes sense? I know I need to use Remote Events and that but I do not know how to integrate it. This is the enable/disable script:
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(inp, processed)
if processed then return end
if inp.KeyCode == Enum.KeyCode.F then
script.Parent["EyeOfX-RayVision"].Enabled = true
end
end)
uis.InputEnded:Connect(function(inp)
if inp.KeyCode == Enum.KeyCode.F then
script.Parent["EyeOfX-RayVision"].Enabled = false
end
end)
All help would be appreciated.
