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

My question is the following statement: Script is not a valid member of LocalScript (?)

Asked by 6 years ago

Line 33

Player = game.Players.LocalPlayer

Mouse = Player:GetMouse()

Mouse.KeyDown:connect(function(key)

key = key:lower()

if key == "f" then

    local x = Instance.new("Part", workspace)

    x.Shape = "Ball"

    x.BrickColor = BrickColor.new("Maroon")

    x.Transparency = 0.5

    x.TopSurface = "Smooth"

    x.BottomSurface = "Smooth"

    x.CanCollide = false

    x.CFrame = Player.Character.Torso.CFrame * CFrame.new(0,0,-12)

    local v = Instance.new("BodyVelocity", x)

    v.velocity = Player.Character.Torso.CFrame.lookVector * 90

    v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)

    local f = Instance.new("Fire")

    f.Size = 10

    f.Parent = x

    local S = script("Script"):clone()

    S.Disabled = false

    S.Parent = x

end

end)

the other one is

script.Parent.Touched:connect(function(hit)

if hit.Parent:FindFirstChild("Humanoid")~= nil then

    hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 20

    script.Parent:remove()  

end

end)

(i had to add the spaces or i would have been a mess)

0
in line 33 type >local S = script:clone() TheSkyofIndia 150 — 6y
0
You need to include wherever you defined "script" as a function (line 33?) in the code you are showing us or we can't get the bigger picture dispeller 200 — 6y

2 answers

Log in to vote
0
Answered by
Optikk 499 Donator Moderation Voter
6 years ago

Try

local S = script.Script:Clone()
Ad
Log in to vote
-1
Answered by 6 years ago

nvm its still a mess

well its at the

local S = script("Script"):clone()

0
Don't post an answer if it isn't an answer.. That's what comments are for. Optikk 499 — 6y

Answer this question