I currently have a script that when you press T on your keyboard, it shoots out a fire beam. It works perfectly fine as just a local script under StarterCharacterScripts but filtering enabled makes the beam invisible to others. I did some work and added a Remote Event under the local script in StarterCharacterScripts and added a regular script under it too. When I try the script in a server it says attempt to index global 'Player' (a nil value) under script but works fine in studio. I'm honestly just confused as freak...
LocalScript:
local en = true
Player = game.Players.LocalPlayer
char = Player.Character
mouse = Player:GetMouse()
game:GetService('UserInputService').InputBegan:Connect(function(input, process)
if input.UserInputType == Enum.UserInputType.Keyboard and not process then
if input.KeyCode == Enum.KeyCode.T then
if en == false then return end
en = false
script.RemoteEvent:FireServer(Player, input)
wait(0.5)
en = true
end
end
end)
Regular Script:
local en = true
Player = game.Players.LocalPlayer
char = Player.Character
mouse = Player:GetMouse()
hum = char.Humanoid
local cast = false
script.Parent.RemoteEvent.OnServerEvent:connect(function(play,mousehit)
game:GetService('UserInputService').InputBegan:Connect(function(input, process)
if input.UserInputType == Enum.UserInputType.Keyboard and not process then
if input.KeyCode == Enum.KeyCode.T and Player and Player.Character then
if en == false then return end
en = false
local anim = hum:LoadAnimation(script["Animation"])
anim:Play(0.1)
anim:AdjustSpeed(0.9) .... etc. etc.

3 comments
Change :FireServer to :FireClient, also you need to change the on another script i know you have OnServerEvent:Connect(function(), change it to OnClientEvent:Connect(function()
^ i didn't test your code i just noticed that error, this error won't show in your Output because the Computer skips over the command if it's not fired with to the correct location.
isnt it supposed to fireserver since its in a local script? also it works now as fireserver so idk...