the normal script is a server script and cannot be placed locally on the client. You would put this script ideally in ServerScriptService
https://gyazo.com/44114910a96347aa5bfcb98ea7aae83c
where do I place Slash:Clone()
do I place it after remote:FireAllClients or
What is the image you attached showing?
The swords Server side script where it damages, moves player on hit I can show you the whole script if you want
why are you firing all clients? Is it so everyone sees it?
Yeah try putting it after remote:FireAllClients
It did nothing, nothing changed
(char limit)
is Slash:Clone() the thing that shows the vfx
"
local function slash(char, comboN)
local m = fx.Slash:Clone()
local hrp = char.HumanoidRootPart
if comboN == 1 then
wait(.8)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(-15))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 2 then
wait(.8)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(0))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 3 then
wait(.9)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(-15))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 4 then
wait(1)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(235))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 5 then
wait(1)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(0))
t:Create(m, TweenInfo.new(.5), {CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
end
"
well This but almost the same thing
well then this must be ran when the remote event fires
Yea, it spawns when remote event fires
Is is running in a local script
yes, You should take at least small glance at the script
Well then if its in a local script, you must transfer it to a server script for it to run on the server side
so you are telling me to take this and paste it in ServerScriptService?
"
local function setUp(char)
local handle = fx.Handle:Clone()
handle.Parent = char
local m6d = Instance.new(“Motor6D”, handle)
m6d.Part0 = char[“Right Arm”]
m6d.Part1 = handle
m6d.C1 = CFrame.new(0,.125,0)
local model = fx.MeshPart:Clone()
model.Parent = workspace.Fx
local weld = Instance.new(“Weld”, model)
weld.Part0 = handle
weld.Part1 = model
weld.C1 = CFrame.new(-0.50,-2.75,0.3) * CFrame.Angles(math.rad(90),0,139.8)
end
for i,v in pairs(game.Players:GetChildren()) do
repeat wait() until v.Character
setUp(v.Character)
v.CharacterAdded:Connect(function(char)
char:WaitForChild(“Right Arm”)
setUp(char)
end)
end
local function slash(char, comboN)
local m = fx.Slash:Clone()
local hrp = char.HumanoidRootPart
if comboN == 1 then
wait(.8)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(-15))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 2 then
wait(.8)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(0))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 3 then
wait(.9)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(-15))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 4 then
wait(1)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(235))
t:Create(m, TweenInfo.new(.5), {CFrame = m.CFrame * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
elseif comboN == 5 then
wait(1)
m.CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(30),math.rad(0))
t:Create(m, TweenInfo.new(.5), {CFrame = hrp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(-100),0), Transparency = 1}):Play()
end
t:Create(m.light, TweenInfo.new(.4), {Brightness = 0}):Play()
local count = 1
local connection
connection = game["Run Service"].RenderStepped:Connect(function()
m.Mesh.TextureId = textures[count]
count = count + 1
if count > #textures then
count = 1
connection:Disconnect()
end
end)
m.Parent = workspace.Fx
if char == c then
local hb = Instance.new("Part", workspace.Fx)
hb.Size = Vector3.new(10,3,7)
hb.CFrame = hrp.CFrame * CFrame.new(0,0,-5)
hb.Anchored = true
hb.CanCollide = false
hb.Transparency = .6
hb.Name = "hb"
hb.Material = Enum.Material.ForceField
hb.CanQuery = false
local con
con = hb.Touched:Connect(function()
con:Disconnect()
end)
local hits = {}
for i,v in pairs(hb:GetTouchingParts()) do
if v:IsDescendantOf(char) == false then
if v.Parent:FindFirstChildWhichIsA("Humanoid") and table.find(hits, v.Parent) == nil then
table.insert(hits, v.Parent)
end
end
end
if #hits == 0 then
local bv = Instance.new("BodyVelocity",char.PrimaryPart)
bv.MaxForce = Vector3.new(99999,0,99999)
bv.Name = "v"
bv.P = 10
game.Debris:AddItem(bv,.2)
if comboN == 5 then
bv.Velocity = char.PrimaryPart.CFrame.LookVector * 20
else
bv.Velocity = char.PrimaryPart.CFrame.LookVector * 5
end
end
local data = {hb = hits, action = "hit", combo = comboN, c = char}
remote:FireServer(data)
hb:Destroy()
end
end
uis.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 and cd == false and c:FindFirstChild(“Stun”) == nil then
c.Humanoid.WalkSpeed = 1
c.Humanoid.JumpHeight = 0
if tick() - lasthit > 300 then
combo = 1
end
lasthit = tick()
cd = true
anim.AnimationId = swingAnims[combo]
local load = c.Humanoid:LoadAnimation(anim):Play()
local data = {char = c, comboN = combo, action = "slash"}
remote:FireServer(data)
slash(c, combo)
if combo == 5 then
combo = 1
else
combo = combo + 1
end
wait(.1)
cd = false
c.Humanoid.WalkSpeed = 16
c.Humanoid.JumpHeight = 7.2
end
end)
"
I dont want to direct you in the exact programming just lead you in a direction. Im saying the script that you use to show the effect should be ran on the server instead. Use the plr parameter to get the character and use that. Im sorry for not helping you directly.
I see, you are trying to help me by leading me to fix but sometimes its better to help directly than to direct.
I am probably gonna learn more quicker from the direct help, rather than leading me with hints I appreciate the way you are trying to help me, clever way to help someone.
Its just that directly will take too much time and effort. Sorry!
That is true.
(character limit)
if you change your mind you can help me directly.