Script error in roblox player

I have designed a script; When equipping a tool you have to take the name of the tool and print it, the problem is that it does it twice and puts the name of another tool (the first one I designed the script for); In Roblox Studio it works perfectly, but in Roblox Player it is a catastrophe.

Code:
local asset = script.Parent.Name
script.Parent.Equipped:Connect(funtion ()
sprint(asset)
end)

Results:
Revolver
AK

-It should be printed only once, and it does it 2 times.

The name of the tool is “Revolver”.

I Don’t speak English, i’m sorry.

Can you provide a screenshot of the studio output?

1 Like

yes, but this script works fine in roblox studio. Wait 5min pls

The problem is that the script must take the name of the tool and then fire that chain to a remote event, the server receives it and it works perfectly, what happens is that in Roblox Player it doesn’t.



script
contexto

In roblox studio it works perfectly, but in roblox player it fires the remote event twice and with another tool that also has that script; This is not the first time it has happened to me, it usually happens when I Copy(Ctrl+A) and paste it into another script, or when duplicating a script. The script is well designed, it is a roblox mistake in my opinion; If you can advise me something, I would appreciate it.
script
FireServe(Boolean,String(name of Animation, String(Name of tool)).

It is firing the remote event twice, when it should not be like that, since it is sent when the “scrip.Parent.Activated” function is fulfilled As I already mentioned, only in Roblox Player

It would be helpful for you to provide all your script, else this will be harder and will have a lot of back and forth

1 Like

I already solved it, it was a very stupid error, but I’m still with this RunService: UnbindFromRenderStep removed different functions with same reference name utility-focus-state-friendstatuslabel-shayleroviedo 2 times. It happens when I restart the player in Roblox Player. “shayleroviedo” is another player’s account.

ah, that may be a roblox issue, because that looks to be something like a CoreScript messing up, not your fault

1 Like

I know that the error is from Roblox, but it has already happened to me in several games, I need a vague idea of ​​what generates it, since it ruins several scripts (I have been seeing this error in my codes for months, whether or not I use “RunService”. Thanks You.