Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make player walk to coordinate in FE game?

Im making a cutscene with the player walking to a point, and It works perfectly in-studio but not in-game. this is a localscript inside of StarterPlayerScripts and runs when a script in ServerScriptService fires a bindable event.

local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()

game.ReplicatedStorage.walking.walk1.Event:Connect(function()
	wait()
			Character.Humanoid:MoveTo(Vector3.new(-907.5, 1.5, -172))
			print("Code ran")
end)
game.ReplicatedStorage.walking.walk2.Event:Connect(function()
	wait()
			Character.Humanoid:MoveTo(Vector3.new(-860.5, 1.5, -172.5))
			print("Code ran")
end)

2 answers

From ROBLOX Wiki:

Allows events defined in one script to be subscribed to by another script. However, please note that BindableEvents do not allows for communication between the server and client. If you are looking for this functionality use RemoteEvents.

You shouldn’t use a Bindable for this.

Instead use a RemoteEvent and use OnServerEvent to fire to the server. You also shouldn’t be using MoveTo, as it instantly moves the Humanoid to the coordinates. Instead, use WalkToPoint.

RemoteEvent.OnServerEvent:Connect(function(player)
    wait()

    player.Character.Humanoid.WalkToPoint = Vector3.new(X, Y, Z)
    print'Code ran'
end)

4 comments

0

#l

0

cgddxfg

0

Here's proof that I showed you it before: https://gyazo.com/a2edbfdbd3cd5a19ef9e8eb5808c44b3

0

Since it’s a comment on someone else ‘s post, probably didn’t even see it.

Hi TheGreenSuperman,

With FE, you need to work with RemoteEvents, not Bindable Events. So, just change that to a RemoteEvent and change the event to .OnClientEvent rather than just .Event. Also, make sure you use the :FireClient() function from the Server.

Hope I helped and have a wonderful day/night.

Thanks,

Best regards,

~~ KingLoneCat

4 comments

0

How do you change the font?

0

Using #. I explained this to you before.

0

You didn’t but okay. thx

This discussion is preserved as it was. New answers, comments, and votes are closed.