-
What do you want to achieve? Fire a remote event to a module script that acts as a local script
-
What is the issue? It won’t fire despite being connected to the script
-
What solutions have you tried so far? Making sure everything is spelt correctly. No errors in logs either
Below is the server script:
local player = game:GetService("Players").PlayerAdded:Wait()
local paper = game.Workspace:WaitForChild("Paper")
local clicker = paper:WaitForChild("ClickDetector")
local pug = game.Workspace.House:WaitForChild("Pug")
local paperUI = player.PlayerGui:WaitForChild("PaperUI")
local paperUI_Button = player.PlayerGui.PaperUI.ImageLabel:WaitForChild("ImageButton")
clicker.MouseClick:Connect(function()
if paperUI.Enabled == false then
paperUI.Enabled = true
pug:Destroy()
end
end)
paperUI_Button.MouseButton1Click:Connect(function()
paperUI.Enabled = false
game.ReplicatedStorage.CutsceneRE:FireClient(player)
end)
Which then fires the CutsceneRE to a module script:
local module = {}
game.ReplicatedStorage.CutsceneRE.OnClientEvent:Connect(function()
print("Hello")
return module
Would I have to reference the player differently, or is there an error somewhere in the code?