Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

2 comments

0

in line 33 type >local S = script:clone()

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

2 answers

nvm its still a mess

well its at the

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

1 comment

0

Don't post an answer if it isn't an answer.. That's what comments are for.

This discussion is preserved as it was. New answers, comments, and votes are closed.