wait(1.5)
local tool = script.Parent
local player = game:GetService('Players').LocalPlayer
local char = player.Character
local hum = char:findFirstChild("Humanoid")
local model = tool.anims
local UIS = game:GetService('UserInputService')
local on = 1
local en = true
local ten = true
local weld = Instance.new("Weld")
local weld2 = Instance.new("Weld")
local LeftArm = char:findFirstChild("Left Arm")
local RightArm = char:findFirstChild("Right Arm")
local swinging = false
local seconds = 0.5
local cooldown = 0
local torso = char.Torso
local blocks = false
local damage = 5
tool.Equipped:Connect(function(mouse) local hitbox = game.ReplicatedStorage.Hitbox:Clone()
hitbox.Parent = workspace
local weld = Instance.new("Weld")
weld.Parent = hitbox
weld.Part0 = torso
weld.Part1 = hitbox
weld.C0 = CFrame.new(0,0,1)
mouse.Button1Down:Connect(function(attack)
if blocks == true then return end
if cooldown == 1 then return end
if en == false then return end
en = false
local anim = hum:LoadAnimation(tool.anims ["Animation"..on])
anim:Play()
ten = true
swinging = true
wait(seconds)
en = true
swinging = false
on = on + 1
if on > 4 then
cooldown = 1
on = 1
wait(2)
cooldown = 0
hitbox.Touched:Connect(function(touching)
if not swinging then return end
if ten == false then return end
local opponent = touching.Parent:FindFirstChild("Humanoid")
local stun = opponent:LoadAnimation(tool.stuns ["Animation"..on])
if touching and swinging == true then
if touching.Parent:FindFirstChild("block") then return end
ten = false
stun:Play()
opponent:TakeDamage(damage)
end
end)
end
end)
end)
This is the script it works perfectly with no mistakes but only the player can see that they are attacking and or stunning another player. Any fixes?

2 comments
changes or additions made to the workspace by the client will only be seen by that client. use a remote event to make the server create the welds
Try checking out this guide: https://developer.roblox.com/articles/Converting-From-Experimental-Mode