Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago

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

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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

0
or do it other way around still works. AlexanderYar 788 — 3y
Ad

Answer this question