RemoteEvent not fired

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would like to be able to start a local script from another local script, then change the player camera to the one in the script.

  2. What is the issue? Include screenshots / videos if possible!
    The print() doesn’t return the text, and that part of the script doesn’t start.

Local Script

--code before firing the event
local Winter = game.Workspace.Winter.Camera
Winter:FireServer()

Local Script

local event = script.Parent

local function Camera()
	print ("fired")
	local Event = script.Parent
	local MainCamera = workspace.CurrentCamera
	local Folder = game.Workspace.Winter
	local FirstCamera = Folder.WinterCam
	local FinalCamera = Folder.FinalWinterCam

	MainCamera.CameraType = Enum.CameraType.Scriptable
	MainCamera:Interpolate(FirstCamera.CFrame, FinalCamera.CFrame, 5)
end

event.OnClientEvent:Connect(Camera)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried searching around, found nothing
1 Like

Where should I move it?
The first local script that starts the other isn’t in the workspace

Well you could move local scripts in the player’s character, only if they are in workspace. I don’t get why you don’t use BindableEvents for Client-Client communication.

1 Like

You should put your event in Replicated storage. And it should look something like this:
Make sure to use a bindable event.

-- LocalScript 1
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local bindableEvent = ReplicatedStorage:WaitForChild("BindableEvent")
bindableEvent:Fire()
-- LocalScript 2
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local bindableEvent = ReplicatedStorage:WaitForChild("BindableEvent")

local function OnEvent()
   --Here you can place your function
end

bindableEvent.Event:Connect(OnEvent)
1 Like

It doesn’t start anyway.
I changed the remote event to bindable event, moved it with the 2’ script in the replicated storage and fixed the script.

Local script 1

--code
local Winter = game.ReplicatedStorage.Script.WinterCam
Winter:Fire()

Local script 2

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local event = script.Parent

local function Camera()
	print ("fired")
	local Event = script.Parent
	local MainCamera = workspace.CurrentCamera
	local Folder = game.Workspace.Winter
	local FirstCamera = Folder.WinterCam
	local FinalCamera = Folder.FinalWinterCam

	MainCamera.CameraType = Enum.CameraType.Scriptable
	MainCamera:Interpolate(FirstCamera.CFrame, FinalCamera.CFrame, 5)
end

event.Event:Connect(Camera)

Send a image of the explorer, so I can see what is going on

1 Like

well does it print the word ‘fired’ ?

NiceToMeetYou is the local script 1
LocalScript is the local script 2
Screenshot (1136)

It doesn’t. It seems that it isn’t fired at all, or the script doesn’t get it

send the place in a file so I can edit it

1 Like

is there a trigger to these events as one script may load before the other meaning the event has been fired but the other script has not loaded quick enough to register it

The two script have loaded more than 10 minutes before the event is needed, so it isn’t a loading problem

what is your trigger then as that might be the problem
edit: Btw i suggest using :WaitForChild in local scripts as it is a good habit to make sure you limit how many errors from loading issues

1 Like

it’s a consequence of story scripts, as one start another when it finishes. There are no problems with starting the script, the only problem is this event

try this:

event.Event:Connect(function()

      print ("fired")
	local Event = script.Parent
	local MainCamera = workspace.CurrentCamera
	local Folder = game.Workspace.Winter
	local FirstCamera = Folder.WinterCam
	local FinalCamera = Folder.FinalWinterCam

	MainCamera.CameraType = Enum.CameraType.Scriptable
	MainCamera:Interpolate(FirstCamera.CFrame, FinalCamera.CFrame, 5)


end)
1 Like

The file is full of other scripts and it can be messy to find the one i’m having problems with, as the 1 local script isn’t that empity. Would you like me to send you a clear file of it?

Doesn’t seem to Fire anyway, sadly

Sure, it would be handy to only see the script you need to work

here is the file
ToTest.rbxl (54.2 KB)

What are you trying to do exactly?
Are you trying to fire from Client To Client?
Or Server to Client?
Or even a bindable event?