Heya! I found an old script of mine and I'm trying to use renderStepped instead ofwhile wait() do so its smoother however I keep getting script is not a valid member of LocalScript on line 19
local star = Instance.new("Part")
star.BrickColor = BrickColor.new("Institutional white")
star.FormFactor = "Custom"
star.Size = Vector3.new(40,40,40)
star.CanCollide = false
star.TopSurface = "Smooth"
star.BottomSurface = "Smooth"
star.Material = "SmoothPlastic"
local glow = Instance.new("PointLight")
glow.Brightness = 3
glow.Parent = star
local msh = Instance.new("SpecialMesh")
msh.MeshType = "Sphere"
msh.Parent = star
local motion = script.Script
game:GetService("RunService").RenderStepped:connect(function()
local dropClone = star:clone()
dropClone.Position = Vector3.new(800,math.random(-300,300),math.random(-300,300))
dropClone.Parent = game.Workspace
dropClone.Anchored = true
local move = motion:Clone()
move.Parent = dropClone
move.Disabled = false
end)
