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

How can I fix the position?

Asked by
cboyce1 40
10 years ago

Something's gone wrong here and I can't get the right coding to position the ball. Can you please help edit it?

SoccerBall = game.Workspace.Part8

Workspace.Part6.CanCollide = false

function Touched(SoccerBall)
    Workspace.Part6.Decal1.Transparency = 0
    Workspace.Part6.CanCollide = false
    wait(3)
    Workspace.Part6.Decal1.Transparency = 1
    Workspace.Part6.CanCollide = true
    SoccerBall.Position = -198.29, 2.28, -111.29
    wait(3)
    Workspace.Part6.Cancollide = false

end

script.Parent.Touched:connect(Touched)

Line 11 is the one I want fixing. Could you please help? Thanks!

1 answer

Log in to vote
0
Answered by 10 years ago

Position is a single Vector3 value.

SoccerBall.Position = -198.29, 2.28, -111.29

Must be:

SoccerBall.Position = Vector3.new(-198.29, 2.28, -111.29)
1
Thank you very much! That has helped me heaps! cboyce1 40 — 10y
0
You're welcome. :-) Drak0Master 172 — 10y
Ad

Answer this question