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

For some reason, why wont the ball spawn?

Asked by 6 years ago
local Ball = Instance.new("Part"), game.Workspace

Ball.Shape = Ball
Ball.Position = game.Workspace.Part.Position
0
1st and 3rd line have issues, add ) at the end of workspace on 1st line and take away the parenthysis next to the comma on 1st line and for 3rd line add 2 speech marks, 1 at the start of ball, 1 at the end TheOnlySmarts 233 — 6y
0
if I helped you out please accept my answer. Otherwise comment how I can help you better. User#21908 42 — 6y

3 answers

Log in to vote
1
Answered by 6 years ago
local Ball = Instance.new("Part", game.Workspace)

Ball.Shape = "Ball"
Ball.Position = game.Workspace.Part.Position

look in roblox wiki for the arguments/parameters for each function

Instance.new(Object in string "", location of newfound object)

make sure to use string for Shape or Enum

0
Can you removed the game.Workspace though and use Ball.Parent, the second param of instance.new (parent) is deprecated User#20388 0 — 6y
0
Im pretty sure its not and Ive been using it for awhile now. AttentionHog 70 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Check if you have Filtering Enabled, If you dont or if it doesn't work when you disable the Filtering Enabled try to use this script:

local Ball = Instance.new("Part")

Ball.Shape = Ball
Ball.Parent = game.Workspace

You dont need the position.

0
You're telling him he doesn't need position when he probably does for whatever purpose. FE had nothing to do with it. AttentionHog 70 — 6y
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Hello there. I hope this explanation helps:

local ball = Instance.new("Part") -- here we create the part
ball.Shape = "Ball" -- shape has to be a string 
ball.Parent = game.Workspace -- here we set the parent to workspace so that you will see it spawn
ball.Name = "SuperBall" -- this is optional though it helps if you have other parts in the workspace
ball.Position = game.Workspace:WaitForChild("SuperBall"):FindFirstChild("Position") -- here we want to make sure that the ball is actually there with the WaitForChild

Hope this helps. Have a great day scripting!

Answer this question