Hello! I’m working on a boss fight for my game. I’m using a remote event to trigger the fight, and it is firing, but not doing anything when being fired.
The remote event is being fired from the server.
This is the script that fires the event:
local PlayersService = game:GetService("Players")
local Players = PlayersService:GetPlayers()
local LocalPlayer = PlayersService.PlayerAdded:Wait()
local RunService = game:GetService("RunService")
local VerdenaPrime = game.Workspace.VerdenaPrime
local Active = VerdenaPrime:WaitForChild("Values").Active
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Triggers = game.Workspace.Triggers
local FightTrigger = Triggers.VerdenaFightTrigger
local StartFightRemote = ReplicatedStorage:WaitForChild("Remotes").StartFight
FightTrigger.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
StartFightRemote:FireClient(LocalPlayer)
print("Fired")
end
end)
And this is the script that recieves it:
local PlayersService = game:GetService("Players")
local ListOfPlayers = PlayersService:GetPlayers()
local VerdenaPrime = game.Workspace.VerdenaPrime
local player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PathfindingService = game:GetService("PathfindingService")
local Modules = ReplicatedStorage:WaitForChild("Modules")
local remotes = ReplicatedStorage:WaitForChild("Remotes")
local StartFightRemote = remotes.StartFight
local UI = VerdenaPrime:WaitForChild("Head").UI
local SecondUI = VerdenaPrime.Head.SecondUI
local Active = VerdenaPrime:WaitForChild("Values").Active
local Attachment0 = VerdenaPrime.HumanoidRootPart.RootAttachment
local Attachment1 = player.Character:WaitForChild("HumanoidRootPart").RootAttachment
-- Requiring Modules
local AttacksList = require(script.Attacks)
local Dialogue = require(Modules.Dialogue)
local HitboxCreator = require(Modules.HitboxCreator)
local UIHandler = require(Modules.UIHandler)
StartFightRemote.OnClientEvent:Connect(function()
print("Starting fight")
-- Dialogue
Dialogue.ShowDialogue("", "The ground shifts beneath you.", player, 2, 2, Color3.fromRGB(255, 255, 255))
wait(4)
Dialogue.ShowDialogue("VERDENA PRIME", "Hello, Amber. I've been expecting you.", player, 3.5, 2, Color3.fromRGB(255, 255, 255))
wait(4)
Dialogue.ShowDialogue("VERDENA PRIME", "We all have been, actually.", player, 3, 2, Color3.fromRGB(255, 255, 255))
wait(4)
Dialogue.ShowDialogue("VERDENA PRIME", "And we've prepared. Everyone you threaten has hidden elsewhere.", player, 4, 2, Color3.fromRGB(255, 255, 255))
wait(5)
Dialogue.ShowDialogue("VERDENA PRIME", "Leaving a hollow shell of what this place once was.", player, 3, 2, Color3.fromRGB(255, 255, 255))
wait(4)
Dialogue.ShowDialogue("VERDENA PRIME", "A shell that I must protect.", player, 2, 2, Color3.fromRGB(255, 255, 255))
wait(3)
Dialogue.ShowDialogue("VERDENA PRIME", "And one that I will.", player, 2, 2, Color3.fromRGB(255, 255, 255))
wait(4)
Dialogue.ShowDialogue("VERDENA PRIME", "Even if it costs me my life.", player, 2, 2, Color3.fromRGB(255, 60, 60))
Active.Value = true
HitboxCreator.CreateBossHitbox(VerdenaPrime, Vector3.new(4.25, 6, 5))
UIHandler.SpawnBossHealthBar("VERDENA /// PRIME")
end)
This is a video of the bug happening, including the output. You can see that the output prints “Fired” which is in the server script that fires the event, after it’s been fired. However it doesn’t print “Starting fight” which should be printed when the event starts.