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

This FE script wouldn't work even with the right arugments. Why?

Asked by 5 years ago

I've put in the parameters Player,char,hum etc but it just won't work. I've read threw it over and over but I could find the problem there are no errors and the only thing that print in the output is "who" and "chew". This is my script thanks for helping. :)

``Local script"

--Q move--Start---
UIS.InputBegan:Connect(function(inputObject,gp) 
    if inputObject.KeyCode==Enum.KeyCode.Q and not gp then
        holdingUKey = true
game.ReplicatedStorage.QStart:FireServer(char,root,hum,Mouse.hit,Mouse)
print("chew")
        end
        end)

--Q move--End--
UIS.InputEnded:Connect(function(inputObject)
    if inputObject.KeyCode==Enum.KeyCode.Q then
        holdingUKey = false
hum.AutoRotate = true
wait(0.2)
game.ReplicatedStorage.QEnd:FireServer(Mouse.hit,root,char,hum)
print("who")
    end
    end)
--When pressed Q it sends uses the Event FireServer and goes to the fowllowing script--

Server Script

game.ReplicatedStorage.QStart.OnServerEvent:Connect(function(Player,char,root,hum,Mousehit,Mouse)
    print("good")
    root.CFrame = CFrame.new(root.Position,root.Position + Mouse.hit.LookVector)
    local tweenInfo1 = TweenInfo.new(0.3,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
                    local Ani = Instance.new("Animation")
                Ani.AnimationId = "http://www.roblox.com/asset/?id=2196053463"
                Ani2 = Player.Character.Humanoid:LoadAnimation(Ani)
                Ani2:Play()
         local  bp2 = Instance.new("BodyPosition")
    bp2.Parent = char.Torso
    bp2.P = 100000
    bp2.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
    bp2.Position = char.Torso.Position
  SuperNovaCircle = Instance.new("Part")
local tween1 = TweenService:Create(SuperNovaCircle,tweenInfo1,{Size = Vector3.new(18.35, 17.66, 0.05)})
SuperNovaCircle.Parent = workspace
SuperNovaCircle.Size = Vector3.new(1.3, 0.05, 1.672)
SuperNovaCircle.Anchored = true
SuperNovaCircle.Name = "SuperNovaCircle"
SuperNovaCircle.CFrame = root.CFrame * CFrame.new(0,1.5,-5)
SuperNovaCircle.Transparency = 1
SuperNovaCircle.CanCollide = false
local Decal2 = Instance.new("Decal")
Decal2.Parent = SuperNovaCircle
Decal2.Texture = "rbxgameasset://Images/TLH_MagicCircle_SuperNova"
Decal2.Face = "Front"
local Decal3 = Instance.new("Decal")
Decal3.Parent = SuperNovaCircle
Decal3.Texture = "rbxgameasset://Images/TLH_MagicCircle_SuperNova"
Decal3.Face = "Back"
tween1:Play()
print("non")
hum.AutoRotate = false
end)


game.ReplicatedStorage.QEnd.OnServerEvent:Connect(function(Player,Mousehit,root,char,hum)
    print("ok")
    Ani2:Stop()
    wait(0.2)
    SuperNovaCircle:Destroy()
    local tweenInfo1 = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
    local tweenInfo = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
    Player.Character.Torso:FindFirstChild("BodyPosition")
    Player.Character.Torso.BodyPosition:Destroy()
    print("blew")
    local Part = game.Workspace.SuperNovaV2:Clone()
    game.Debris:AddItem(Part,6)
    Part.Parent = workspace
    Part.Anchored = true
    Part.CFrame = Player.Character.HumanoidRootPart.CFrame * CFrame.new(0,3,-20)
    Part.Anchored = false
    local bv = Instance.new("BodyVelocity")
   bv.Parent = Part
    bv.MaxForce = Vector3.new(1e8,1e8,1e8)
   bv.Velocity = Mousehit.LookVector*170
    local Part2 = game.Workspace.SuperNovaV:Clone()
    game.Debris:AddItem(Part2,6)
    Part2.Parent = workspace
    Part2.Anchored = true
    Part2.CFrame = Player.Character.HumanoidRootPart.CFrame * CFrame.new(0,3,-20)
    Part2.Anchored = false
    local bv = Instance.new("BodyVelocity")
   bv.Parent = Part2
    bv.MaxForce = Vector3.new(1e8,1e8,1e8)
   bv.Velocity = Mousehit.LookVector * 170
  Part2.Touched:Connect(function(hit)
    local Boom = Instance.new("Part")
    game.Debris:AddItem(Boom,1)
    Boom.Parent = workspace
    Boom.BrickColor = BrickColor.new("CGA brown")
    Boom.Material = "Neon"
    Boom.Shape = "Ball"
    Boom.Size = Vector3.new(11.115, 11.115, 11.115)
    Boom.Anchored = true
Boom.CanCollide = false
Boom.CFrame = Part.CFrame
local tween2 = TweenService:Create(Boom,tweenInfo1,{Size = Vector3.new(115.115, 115.115, 115.115)})
local tween3 = TweenService:Create(Boom,tweenInfo1,{Transparency = 1})
    local Ring = workspace.Ring:Clone()
local tween4 = TweenService:Create(Ring,tweenInfo1,{Transparency = 1})
game.Debris:AddItem(Ring,1)
Ring.Parent = workspace
Ring.Size = Vector3.new(15.111, 8, 15.111)
Ring.Anchored = true
Ring.CanCollide = false
Ring.CFrame = Part.CFrame
local tween = TweenService:Create(Ring,tweenInfo1,{Size = Vector3.new(179.445, 95, 179.445)})
Boom.Touched:Connect(function(hit)
    if not ten then return end
    ten = false
        local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
     if ehum and ehum ~= Player.Character.Humanoid then
        ehum:TakeDamage(20)
        elseif hit.Anchored == true and hit.Cancollide == true then
    end
    end)
wait()
ten = true
tween3:Play()
tween4:Play()
tween:Play()
tween2:Play()
Part2:Destroy()
Part:Destroy()
end)
end)

--Clones a object from the workspace and shoots it out where ever the players Mouse is pointing at--There is also a bunch of body movers like bodyPosition and bodyvelocity
0
hit is deprecated use Hit User#19524 175 — 5y
0
^ dude, most of the comments you give are about deprecation and all.... greatneil80 2647 — 5y
0
Replace TweenService to game.TweenService:Create Makz69 0 — 5y

Answer this question