Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

?Trying to activate a script that's in a different place

So right now I have a script that's supposed to activate a script that has a local code name called Camera this is what i have already. But one problem I forgot how to activate scripts that in the workspace but in different part of it. Camera is a script in a different part of the workspace.

Photo: https://gyazo.com/e7a5ad2c34df9d7d9b3f9cb5a6d07872



local player = game.Players.LocalPlayer
local Camera = game.Workspace.CameraGUI:WaitForChild("LocalFlatRhino")
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

function onSeated(isSeated, seat)
	if isSeated then
		Camera = false
		 print("Deactivate Script")
	else
		Camera = true
	end
end
 


-- 11/22/2020 4:04 PM

1 answer

if so, you simply need to use a remote event, put one in replicatedStorage and then call the remove event from server script using :FireClient(playerInstance,optional params) and make the local script listen to that using "game.replicatedstorage.remoteEvent.OnClientEvent:Connect(function()" and boom now you can disable local scripts with the client, but from server

1 comment

0

or do it other way around still works.

This discussion is preserved as it was. New answers, comments, and votes are closed.