You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want to fire a remote event that causes an npc to move torwards the player.
- What is the issue? Include screenshots / videos if possible!
The remote event is being fired by the client, but is not being recieved by the script.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried moving it to different locations such as: Replicated First, Replicated Storare, Server Storage, and Server Script Service, but nothing seemed to work.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Local Script
local player = game.Players.LocalPlayer
local char = player.Character
script.Parent.MouseButton1Click:Connect(function()
game.Workspace.Camera.CameraSubject = game.Workspace.Dummy.Humanoid
wait(5)
game.ReplicatedStorage.Transfer:FireServer(player, char)
local ss = game.SoundService
local sound = ss.chase
sound:Play()
end)
Server Script
script.Parent.OnServerEvent:Connect(function(player, char)
char.Head.Face.Texture = "rbxassetid://2541148009"
local newchar = player.Character
local humroot = newchar.HumanoidRootPart.Position
while true do
wait()
char.Humanoid:MoveTo(humroot)
end
end)
If you were wondering, i change the player’s character to an npc, and make the old character chase the npc.
Here is an image of the directory:
Remote Event;
Local Script;
Dummy;
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.