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
01 | local player = game.Players.LocalPlayer |
02 | local Camera = game.Workspace.CameraGUI:WaitForChild( "LocalFlatRhino" ) |
03 | local character = script.Parent |
04 | local humanoid = character:WaitForChild( "Humanoid" ) |
05 |
06 | function onSeated(isSeated, seat) |
07 | if isSeated then |
08 | Camera = false |
09 | print ( "Deactivate Script" ) |
10 | else |
11 | Camera = true |
12 | end |
13 | end |
14 |
15 |
16 |
17 | -- 11/22/2020 4:04 PM |
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