Basically making a sword fighting system and for some odd reason when I fire the event it returns the actual player and the players name.
-- LOCAL
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
if player.Character.ExtraData.Armed.Value == true then
local WeaponName1 = script.Weap.Value
local WeaponName = WeaponName1
print(WeaponName)
print("Is armed L")
if player.Character:FindFirstChild(WeaponName) then
print("Found Weapon L")
local Weapon = player.Character:FindFirstChild(WeaponName)
game.ReplicatedStorage.Combat.Slash:FireServer(player, Weapon)
end
end
end)
-- SERVER
local thing1 = game.ReplicatedStorage.Combat.Slash
thing1.OnServerEvent:connect(function(player, Weapon)
print("Slash Fired S")
print(Weapon.Name)
That is the only part of the serverscript it does, yes the actual script has ends and all that. But you see when it prints the sword name for the local it prints ("Starter") (The sword name) but when it prints for the server it prints my username. I have also tried to just send the name of the item instead of the item itself to the server and it still won't work at all and just sends my username on the server.

14 comments
How would the server script know what the "player" is then?
The server script knows the player by default when using a remote event theirs no need to define it
for me its erroring.
What does it say?
its just underlining lots of variables. (Red underline
did u get rid of it from the server script too?
also it needs the player so it can make them use a animation and make sure they are already not attacking
Yes I did change it on the server too
thing1.OnServerEvent:connect(function(player, Weapon) keep this the same just remove it from game.ReplicatedStorage.Combat.Slash:FireServer(Weapon)
don't remove player from the server
Just did what you said its work except no animation and no damage. but all the prints except for one in the middle work.
nvm fixed animation
Alright so it worked?
I'm still making sure it works 100% before accepting the ans