Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Filtering-Enabled - Just need to enable a script?

Asked by 6 years ago

I'm fairly new to Filtering Enabled. I have a soccer game which I made ages ago, but I have an issue where I'm trying to convert it to server-side yet I can't because I can't understand the ROBLOX Wiki with converting the scripts to server-side.

Essentially, all of the scripts are LocalScripts; each one of them animates the player (using old-style welds ;)), but the issue is that none of this is happening due to it being local. Is there any way of converting it to server-side?

I would physically need to either use the :FireServer() event, but I'm not sure how I'd do it.

Here's an example of one of the scripts for the tools:

local debris = game:service("Debris")
Go = script.Parent.Parent.Kick
Go1 = script.Parent.Parent.BKick
Go.Value = 0
Go1.Value = 0
Kick = false
script.Parent.Selected:connect(function(m) 
m.Button1Down:connect(function() 
if Go.Value == 1 then return end
Go.Value = 1
if script.Parent.Parent.Parent.Character == nil then return end
if script.Parent.Parent.Parent.Character:findFirstChild("Torso") == nil then return end
if script.Parent.Parent.Parent.Character:findFirstChild("Right Leg") == nil then return end
Torso = script.Parent.Parent.Parent.Character.Torso
RL = script.Parent.Parent.Parent.Character["Right Leg"]
Hip = Torso["Right Hip"]
Hip.Part1 = nil
W = Instance.new("Weld")
W.Parent = RL
W.Part0 = Torso
W.Part1 = RL
Kick = true
script.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = 20
LH = script.Parent.Parent.Parent.Character.Torso["Left Hip"]
RH = script.Parent.Parent.Parent.Character.Torso["Right Hip"]
LH.MaxVelocity = "0.2"
RH.MaxVelocity = "0.2"
W.C0 = CFrame.new(0.5,-1.8,-0.5) *  CFrame.fromEulerAnglesXYZ(math.pi/8,0,0)
RL.Touched:connect(function(hit)
if Kick == false then return end
if hit.Locked == true or hit.Anchored == true then return end
Kick = false
F = Instance.new("BodyVelocity")
F.Parent = hit
F.velocity = RL.CFrame.lookVector * 25
F.maxForce = Vector3.new(9e+010,1e+005,9e+010)
debris:AddItem(F,0.3)
end)
wait(0.7)
Kick = false
W:Remove()
Hip.Part1 = RL
wait(0.1)
Go.Value = 0
Go1.Value = 0
end)
end)
0
indents please Fifkee 2017 — 6y
0
Seleted is what? Not TextButton? NiniBlackJackQc 1562 — 6y
0
my OCD for spacing is kicking in.. hellmatic 1523 — 6y

Answer this question