2jammers
(2jammers)
January 29, 2022, 6:36pm
#1
As the title suggests, the character is not moving for some reason.
Here is my code:
local houseInterior = game.Workspace:WaitForChild("HouseInterior")
local owner = script.Parent.Parent.Parent.BGUI.HouseOwner
script.Parent.GoInside.Triggered:Connect(function(playerWhoTriggered)
if script.Parent.DoorLocked.Value == false then
playerWhoTriggered.Character:MoveTo(Vector3.new(1,1,1))
end
end)
I don’t get any errors either.
Milkeles
(Milkeles)
January 29, 2022, 6:56pm
#2
I’m pretty sure you need to use :MoveTo() on a humanoid, so try this instead:
playerWhoTriggered.Character.Humanoid:MoveTo(Vector3.new(1, 1, 1))
1 Like
Milkeles
(Milkeles)
January 29, 2022, 6:59pm
#3
If it still does not work check if the player exists actually. Even if it exists in the game by the time the function is run, you might not be giving the correct data to the function. Simply print the player’s name somewhere in the script.
2jammers
(2jammers)
January 29, 2022, 7:02pm
#4
That’s weird… it only works in the cmd bar like this:
game.Players.LocalPlayer.Character:MoveTo(Vector3.new(1,1,1))
Maybe it only works on the client?
Synitx
(Synitx)
January 29, 2022, 7:04pm
#5
Humanoid:MoveTo()
will force player to WALK to the position not tp.
while Model:MoveTo()
will make it teleport.
@2jammers if MoveTo()
isnt working for you then try
playerWhoTriggered.Character:SetPrimaryPartCFrame(CFrame.new(Vector3.new(1,1,1)))
Keep this in mind
That Doorlocked value is false.
That the proximity prompt is actually triggering.
you can debug it by using print()
to check if trigger or not.
2jammers
(2jammers)
January 29, 2022, 7:07pm
#6
It seems the the prompt isn’t triggering.
Synitx
(Synitx)
January 29, 2022, 7:09pm
#7
Can you record a video triggering the prompt with the output
on?
2jammers
(2jammers)
January 29, 2022, 7:10pm
#8
No, sadly I can’t record videos.
Sorry, i’m just scared of info getting leaked, besides I don’t have any software.
2jammers
(2jammers)
January 29, 2022, 7:13pm
#9
I might just do this tomorrow, im wasting time to be productive
Synitx
(Synitx)
January 29, 2022, 7:15pm
#10
Ah okay, so this gonna be tough without a video but sure.
Any errors in the output? and where did you put the “print” function to debug the code?
2jammers
(2jammers)
January 29, 2022, 7:15pm
#11
I put the print function on the first line of the function, no result.
Synitx
(Synitx)
January 29, 2022, 7:20pm
#12
Can you at least show the screen shot of the explorer where your proximity prompt is?
Sarchyx
(Sarchyx)
January 29, 2022, 7:47pm
#13
Where is your script located? Is it a LocalScript? Take in mind scripts don’t run at certain places.