Why is Y cannot be assigned appearing? Error in output
I scripted this in like 2 minutes, basically, I made a model in my game so whenever a player steps on it, it would fall down and disappear then after the cooldown it will reappear, basically like an obstacle.
It says in the output: Y cannot be assigned to (line 11)
03 | for _,v in pairs (script.Parent:GetChildren()) do |
04 | if v.Name = = 'Script' then return end |
05 | if v:IsA( "BasePart" ) then |
06 | v.Touched:Connect( function (hit) |
07 | if hit.Parent:FindFirstChildWhichIsA( "Humanoid" ) then |
11 | v.Position.Y = v.Position.Y - i |
17 | v.Transparency = v.Transparency + i |
23 | v.Position.Y = v.Position.Y + i |
29 | v.Transparency = v.Transparency + i |