RemoteEvent not picking up on the client

I’m trying to make something for my game, but for some reason, when I use :FireAllClients() it doesn’t pick up on the client at all

Client script:

-- // SERVICES // --
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")

-- // REMOTES // --
local Remotes = ReplicatedStorage:WaitForChild("Remotes", 5)
local UpdateSongRemote = Remotes:WaitForChild("UpdateSong", 5)

-- // MODULES // --
local Modules = ReplicatedStorage:WaitForChild("Modules", 5)
local SongInfo = require(Modules:WaitForChild("SongInfo", 5))

-- // GUI // --
local Gui = script.Parent
local Text = Gui:WaitForChild("TextLabel", 5)

-- // VALUES // --
local StartPosition = UDim2.new(0, 0, 0.95, 0)
local EndPosition = UDim2.new(-0.75, 0, 0.95, 0)

-- // TWEENS // --
local StartTween = TweenService:Create(Text, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {Position = StartPosition})
local EndTween = TweenService:Create(Text, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {Position = EndPosition})

-- // FUNCTIONS // --
Text.Position = EndPosition

function UpdateSong(SongName:string)
	print(SongName)
	
	Text.Text = "NOW PLAYING: "..SongInfo.Title[SongName].." - "..SongInfo.Source[SongName].." - "..SongInfo.Author[SongName]
	StartTween:Play()
	
	task.delay(4, function()
		EndTween:Play()
	end)
end

-- // CONNECTIONS // --
UpdateSongRemote.OnClientEvent:Connect(UpdateSong)

Server script:

UpdateSongRemote:FireAllClients(SongName)
1 Like

maybe like remove the 5 ?

idk… it seems goot to me

I’m still having the same problem

That can’t be all the serverside script is, right? I’m guessing the remote is firing before the client connects. Did you add a delay or something to make sure the remote doesn’t run too early?

IT WORKS NOW

All I had to do was just disable “ResetOnSpawn” because the script was inside of a gui

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.