So im trying to make a rope that welds u to it when you trigger the proximity prompt, it is 2 seconds long. Problem is, it creates 2 welds instead of 1? But why?
local script:
local remote = game:GetService("ReplicatedStorage"):FindFirstChild("weldcreate")
local plr = game:GetService("Players").LocalPlayer
remote.OnClientEvent:Connect(function(player)
local welds = Instance.new("Weld", game.Workspace)
local character = plr.Character
if character:FindFirstChild("HumanoidRootPart") then
print("Found")
welds.Part0 = game.Workspace.Model:FindFirstChild("4")
welds.Part1 = character.HumanoidRootPart
else
print("No HRP")
end
end)
server script:
local remote = game.ReplicatedStorage.weldcreate
script.Parent.Triggered:Connect(function(plr)
remote:FireClient(plr)
print(plr)
end)
This is kinda annoying, if anyone can help please do. also if u have advice for the rope let me know
on the local script “found” is printed twice. alright i removed player argument even tho it wont fix it. also nope, multiple scripts arent firing/receiving it
i added your scripts to my game to test it out and it doesn’t print twice to me, which means you’re firing the remote twice. try this method:
in studio click on the following keys: shift + control + F
→ this will open a tab where you can search for certain things in all of the scripts in your game
search for remote:FireClient. if there are more than 2 scripts than make sure there’s only 1.
So what happened was that I think i may have tampered with a normal script and changed its runcontext to client as seen here:
The problem with this is that normally with a startercharacter scripts, it would go into the player character and the one specifically in startercharacter would be disabled but instead the one in the players character and the one in starterplayer.startercharacter would fire. I just put in a normal local script with the same code and it works noramlly now, thank yall boys!