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

Unable to cast double to Coordinateframe?

Asked by 10 years ago

Line 27:

1x:SetPrimaryPartCFrame(CFrame.new(math.random(-200,200),math.random(50,100), math.random(-200,200)))

What am I doing wrong?

[Edits:]

01while wait() do
02    local P = Instance.new("Part")
03    local M = Instance.new("SpecialMesh")
04    M.MeshId = game.ReplicatedStorage.Taco.MeshId
05    M.TextureId = game.ReplicatedStorage.Taco.TextureId
06    P.CanCollide = false
07    if plr:FindFirstChild("Shape").Value == "Taco" then
08        P.Rotation = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
09        P.Size = Vector3.new(10, 10, 10)
10        P.BrickColor = BrickColor.Random()
11        P.Parent = game.Workspace.CurrentCamera
12        P.Position = Vector3.new(math.random(-200,200),math.random(50,100),math.random(-200,200))
13        M.Parent = P
14        M.Scale = Vector3.new(10, 10, 10)
15        light = Instance.new("PointLight", P)
View all 33 lines...
1
This line runs fine for me. Are you sure this is the correct line from the correct script? Could you provide surround lines, since sometimes Lua is off by a few due to whitespace? BlueTaslem 18071 — 10y
0
Done ZirutoHellfire 10 — 10y
0
Oh and the Taco mesh parts don't appear as quick/rapid as the actual parts any explanations on that too? ZirutoHellfire 10 — 10y
0
I just realiesed I didn't parent it .-. ZirutoHellfire 10 — 10y

Answer this question