I’m trying to fire from a local script with a bindable event to another local script
event:FireServer("hi")
---
event.OnServerEvent:Connect(function(__PLAYER, __TEXT)
otherevent:FireClient(__OTHERPLAYER,__TEXT)
end)
---
otherevent.OnClientEvent:Connect(function(__TEXT)
print(__TEXT)
end)
---
How should I use this in my script
In the first local script, the original player who fires to server, put the first line before the first “—”
then a normal script put the middle line, make sure to replace __OTHERPLAYER with the desired player WHO should receive the EVENT and finally a localscript to handle the client event that __OTHERPLAYER receives.
Why the lines before the player?
maybe try moving the bindable event to be in the script?
Are you firing :FireServer() from a local script?
I have to delete the first script since it’s with a UI that needs to be removed as first as the second script start
Yeah, i’m using Winter:Fire()
are u sure the event gets fired before the script is destroyed?
The 1st Local Script should be changed to a Server Script located in ServerScriptService & Instead of :FireServer() It should be :FireClient()
And change the RemoteEvent to Replicated storage.
they using a bindable event so it’s :Fire
and .Event
I see, are they trying to make a cutscene for all clients, or just one?
If it’s just one then using a RemoteEvent would be more effective I think
idk actually but does it really matter because they both do the same thing and a bindable event can activate the other script quicker
i can’t change the first script, it is already used for another thing. The only script i can change is the 2
the cutscene should appear only to the local player
not sure and idk how to check, i can try putting a delay before it gets destroyed to see
it doesn’t gets fired. I added a delay before destroying and it still didn’t fire
:Fire() Does absolutely nothing. It’s either :FireServer() or :Fireclient() depending on the type of script
you need to fore it in serverscriptservice