I'm making an Undertale game and currently I'm working on the froggit battle. I have a remote event (named FroggitAttack) and I'm using it to activate the battle script when a player is in the battle. But it isn't doing anything, I've added prints to see what's happening and the remote event is firing but it isn't getting received.


Code


Detecting if the player touches the hitbox for getting into the froggit fight script

local blacklist = {};

script.Parent.Touched:Connect(function(hit)

local humanoid = hit.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
	
	local Player = game.Players:GetPlayerFromCharacter(humanoid.Parent)
	humanoid.Parent.Humanoid.WalkSpeed = -100
	humanoid.Parent.Humanoid.JumpPower = -100
	
	wait(1.20)
	
	humanoid.Torso.CFrame = CFrame.new(-123.15, 5.75, 86.6)
	humanoid.Parent.Humanoid.WalkSpeed = 16
	humanoid.Parent.Humanoid.JumpPower = 50
end

end)

local players = game:GetService("Players");

function foundInList(player) for _,target in ipairs(blacklist) do if target == player then return true; end end return false; end

script.Parent.Touched:connect(function(hit)

local player = players:GetPlayerFromCharacter(hit.Parent);

if player then

	if not foundInList(player) then
		
		table.insert(blacklist,player);
		
	
		
		local ShowGUI = game.ServerStorage:FindFirstChild("ShowGUI")
		if (ShowGUI ~= nil) then
			
			game.ReplicatedStorage.Events.BlackScreen:FireAllClients()
			ShowGUI.Parent = player.PlayerGui
			
		
			
		end
	end
end

end);


Showing the transition local script

game.ReplicatedStorage.Events.BlackScreen.OnClientEvent:Connect(function()

game.Workspace.Transition.Playing = true

script.Parent.BlackScreen.Black.Visible = true
wait(0.13)
script.Parent.BlackScreen.Black.Visible = false

wait(0.12)

script.Parent.BlackScreen.Black.Visible = true
wait(0.17)
script.Parent.BlackScreen.Black.Visible = false

wait(0.16)

script.Parent.BlackScreen.Black.Visible = true
wait(0.21)
script.Parent.BlackScreen.Black.Visible = true

wait(0.2)

script.Parent.BlackScreen.Black.Visible = true
wait(0.25)
script.Parent.BlackScreen.Black.Visible = false

workspace.Transition.Playing = false
workspace.FightMusic.Playing = true

game.ReplicatedStorage.Events.FroggitAttack:FireServer()
print("RemoteEvent Fired")

end)


The battle script

local TS = game:GetService("TweenService")

game.ReplicatedStorage.Events.FroggitAttack.OnServerEvent:Connect(function(player) print("RemoteEvent Received")

wait(2)

print("Attack Started")

local Shooter1 = game.ReplicatedStorage.Froggit.Shooters.Shooter1 Shooter1.Parent = workspace

wait(0.25)	
local Pellet1 = game.ReplicatedStorage.Froggit.Pellets.Pellet:Clone()
Pellet1.CFrame = Shooter1.CFrame 
Pellet1.Orientation = Vector3.new(0, 0, 90)
Pellet1.Parent = workspace
	
local goal = {}
goal.Position = Pellet1.Position + Vector3.new(0,-50,0)
goal.Size = Pellet1.Size + Vector3.new(6,6,6)
local info = TweenInfo.new(3, Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
local tween = TS:Create(Pellet1,info,goal)
tween:Play()

end)

By the way, there are no errors in the out put.