You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
-I want to spawn a dummy whenever a player touch a part. -
What is the issue?
-I completed the summoning part. So basically, if a player touched a part, the script will get the name using “hit”. This is the fire script.
script.Parent.Touched:Connect(function(hit)
if not debounce then
debounce = true
local remote = rep:WaitForChild("Snake")
local target = hit.Parent
local dum = Storage.Dummy:Clone()
dum.Parent = game.Workspace.AInow
dum.HumanoidRootPart.CFrame = spawner.CFrame
wait(cd)
debounce = false
remote:FireClient(target)
end
end)
this is the local script that recieve the “target”
local remote = game.ReplicatedStorage.Snake
remote.OnClientEvent:Connect(function(target)
script.Parent.spotter.Name = target.Name
script.Parent.Parent["AI Chase"].Disbaled = false
end)
this should work fine, the dummy spawned but the value didn’t change. The output say “FireClient: player argument must be a Player object”
3. What solutions have you tried so far?
-I searched on the internet about fire event, but it seems like i used them corretly…
-I used fire client on a server script and OnClientEvent on a local script.
Pls help! Anyhelp would be appreciate…