Server Script:
local wepevent = game.ReplicatedStorage.re.wep
wepevent.OnServerEvent:Connect(function(Player, rga, rightarm)
local wep = game:GetService("ReplicatedStorage").Moves.weapon:Clone()
local weld = Instance.new("WeldConstraint")
wep.Parent = Player:WaitForChild("Character")
print("step one complete")
weld.Parent = wep
weld.Part0 = rightarm
weld.Part1 = wep
print("step two")
wep.Position = rga.WorldPosition
end)
Local Script:
local LC = game.ReplicatedStorage.re.wep
ui.InputBegan:Connect(function(input)
print("ui")
if input.KeyCode == Enum.KeyCode.Q then
print("q")
local rga = rightarm:WaitForChild("RightGripAttachment")
local wep= character:WaitForChild("wep")
LC:FireServer(rga, rightarm, print("fired"))
hitt = true
wep.Touched:Connect(function(hit)
if hitt == true then
hitevent:FireServer(hit, damage*1.3)
hitt = false
end
end)
end
end)