Hi, I’m making a game that I’m about to launch but there’s a script that isn’t working:
while wait(0.001) do
local ballposition = game.Workspace.ball.Position.Y
script.Parent.Position.Y = ballposition
end
this script is used to change the height of a part according to the height of another part but it doesn’t work, my output says: “Y cannot be assigned to - Server - Script”
local Parent = script.Parent
local Ball = workspace.ball
while true do task.wait()
Parent.Position = Vector3.new(
Parent.Position.X,
Ball.Position.Y,
Parent.Position.Z
)
end
I’m guessing that since the error is “cannot be assigned to Server Script”, script.Parent won’t work since script.Parent will reference the ServerScriptService.