Hi, So I tried to make a Line System where a player moves up every time a player is done with buying items from an NPC Shop, But Here is the issue: I don’t know how to script, whether the part has detected a humanoid or not so here are some explanations. Hopefully, this might give you guys an understanding.
Note: I posted something similar a few days ago but now I need help again so please don’t hate me for this.
There is also a script below to maybe find a way to move the player to the next part.
local Detection2 = game.Workspace.Detection2
local linePart = game.Workspace.LinePart4
local function onTouch(hit)
if (hit.Parent:FindFirstChild("Humanoid")~= nil) then
hit.Parent.Humanoid.WalkSpeed = 0
hit.Parent.Humanoid.JumpPower = 0
print("Froze Player")
if not Detection2 then
hit.Parent.Humanoid:MoveTo(Vector3.new(0.07, 0.275, -43.76))
end
end
end
script.Parent.Touched:Connect(onTouch)
I am highly missing something and I need some help, I looked through humanoids and part detections where if a humanoid is found the player will use the :MoveTo but I still don’t really understand the concept.