Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

FireServer not firing event from localscript. Why?

Asked by 1 year ago

FireServer isnt actually firing from my local script to the server script but for some reason there are zero erros

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local mouse = plr:GetMouse()
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local ServerStorage = game:GetService("ServerStorage")
local CharacterFiles = ReplicatedStorage.CharacterFiles
local CharacterStats = CharacterFiles.Stats
local CharacterEvents = CharacterFiles.CharacterEvents
local mainMenuGui = script.Parent
local Species = script.Parent.CharacterSeelection.SpeciesFrames
local Heretic = Species.HereticFrame
local Witch = Species.WitchFrame
local Vampire = Species.VampireFrame
local camera = game.Workspace.Camera

Heretic.BeauFrame.BeauButton.MouseButton1Down:Connect(function()
    CharacterEvents.BeauEvent1:FireServer()
end)

1 answer

Log in to vote
0
Answered by
MattVSNNL 620 Moderation Voter
1 year ago

For some reason, remote events only fire on waitforchild in the client

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local mouse = plr:GetMouse()
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local ServerStorage = game:GetService("ServerStorage")
local CharacterFiles = ReplicatedStorage.CharacterFiles
local CharacterStats = CharacterFiles.Stats
local CharacterEvents = CharacterFiles.CharacterEvents
local mainMenuGui = script.Parent
local Species = script.Parent.CharacterSeelection.SpeciesFrames
local Heretic = Species.HereticFrame
local Witch = Species.WitchFrame
local Vampire = Species.VampireFrame
local camera = game.Workspace.Camera

Heretic.BeauFrame.BeauButton.MouseButton1Down:Connect(function()
    CharacterEvents:WaitForChild("BeauEvent1"):FireServer()
end)
0
? Xapelize 2658 — 1y
Ad

Answer this question