the error starts below here
local function MoveCharacter(lookVector, MoveDis)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local humanoidRootPart = char.HumanoidRootPart
if humanoidRootPart then
humanoidRootPart.CFrame = humanoidRootPart.CFrame + (lookVector.CFrame.LookVector * MoveDis)
end
end)
end)
end
local function ActivateClickDetector (MyClickDetector, MyLookVector, MoveLength)
MyClickDetector.MouseClick:Connect(function(mousClick)
if mousClick then
CameraPrimaryPart.CFrame = CameraPrimaryPart.CFrame +(MyLookVector.CFrame.LookVector * MoveLength)
CameraPrimaryPart.Orientation = MyLookVector.Orientation
MoveCharacter(MyLookVector, MoveLength)--here it didn't work, idk why, there is no error in the output
print("ClickDetector works fine")
end
end)
end
ActivateClickDetector(StraightArrowclickDetec, straightArrLookVec, 50)
ActivateClickDetector(DiagonalLArrowclickDetec, diagonalLArrLookVec, 50)
ActivateClickDetector(DiagonalRArrowclickDetec, diagonalRArrLookVec, 50)

3 comments
Just want to say English is not my main language so the variables might sound a little cringe
this is the first time i post something so it looks pretty ugly
finally i know how to identify the script and normal texts