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

The end part of this script does not work, how can i fix it?[edited]

Asked by 3 years ago

idk what to do to make it work, please help, thnx ps: this is like one of my previous question but this has another part at the end, it is quite advanced for me so please help me with this one.

function CreatingParts(name, position)
    local CreateNewPart = Instance.new("Part", workspace)
    CreateNewPart.Anchored = true   
    CreateNewPart.Position = position
    CreateNewPart.Name = name
    print("Done")
end


CreatingParts("Help", Vector3.new(4, 2.5, 43))
CreatingParts("LOL", Vector3.new(5, 2.5, 43))
CreatingParts("IHML", Vector3.new(6, 2.5, 43))
CreatingParts("HMM", Vector3.new(7, 2.5, 43))
CreatingParts("Meow", Vector3.new(8, 2.5, 43))
CreatingParts("CreativityIntensifies", Vector3.new(9, 2.5, 43))
CreatingParts("Superb", Vector3.new(10, 2.5, 43))
CreatingParts("IDKWHATNAMEISHOULDGIVE", Vector3.new(11, 2.5, 43))
CreatingParts("IDK2", Vector3.new(12, 2.5, 43))
CreatingParts("IDK3", Vector3.new(13, 2.5, 43))

wait(7)
if game.Workspace.AriyanHacker29.Humanoid.position ~= Vector3.new(13, 2.5, 39) then
    wait(1)
    game:WaitForChild("LOL").BrickColor = BrickColor.new("Really red")
end
0
Position isn't a property of Humanoid, try HumanoidRootPart Amiaa16 3227 — 3y

1 answer

Log in to vote
0
Answered by
D4_rrk 89
3 years ago

On line 24, you forgot to add in Workspace so it should be

game.Workspace:WaitForChild("LOL").BrickColor = BrickColor.new("Really red")
0
You can also just use the workspace global, as it is shorter to write and it has little to no performance difference. brokenVectors 525 — 3y
0
i gave but it still did not change the color AriyanHacker29 22 — 3y
0
I see a new problem now, you are trying to change your Humanoid's position which can't be made so instead of Humanoid, do HumanoidRootPart since it works with both R6 and R15 and does the same function of moving you. D4_rrk 89 — 3y
0
oooooo it worked thanks AriyanHacker29 22 — 3y
0
No problem, could you accept my answer? D4_rrk 89 — 3y
Ad

Answer this question