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

Why wont this script work?

Asked by 10 years ago

no errors in the output and its a localscript in workspace it does not show m and m2

 num=3.5
mouse=game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key)
if key:lower()=="q" then
num=4.5
end
if key:lower()=="e" then
num=2.5
end
end)
mouse.KeyUp:connect(function(key)
num=3.5
end)
m=Instance.new("Part",workspace)
m.Name="Float"
m.FormFactor=0
m.Name = "MyPad"
m.BottomSurface="Smooth"
m.TopSurface="Smooth"
m.Size=Vector3.new(5,1,5)
m.BrickColor=BrickColor.new(0,255,0)
m.Anchored=true
s=Instance.new("Sparkles")
s.Parent=m
s.Color = Color3.new(0,255,0)
m2=m:clone()
m2.Parent=workspace
m2.BrickColor=BrickColor.new(0,0,0)
m2.Name = "MyPad2"
c=0
c2=45
while wait() do
c=c+5
c2=c2+5
p=game.Players.LocalPlayer.Character.HumanoidRootPart.Position
--game.Players.LocalPlayer.Character.Torso.CFrame=game.Players.LocalPlayer.Character.Torso.CFrame*CFrame.new(0,-(num)+3.5,0)
m.CFrame=CFrame.new(p.X,p.Y-num,p.Z)*CFrame.Angles(0,math.rad(c),0)
m2.CFrame=CFrame.new(p.X,p.Y-num,p.Z)*CFrame.Angles(0,math.rad(c2),0)
end 

0
Your script is oddly similar, if not identical, to the one in this question: https://scriptinghelpers.org/questions/9950/how-to-insert-smoke-into-a-part-via-script Spongocardo 1991 — 10y

Answer this question