Tool auto equip problem

well I was gonna use the local script for gui stuff thats why I have those

@soprosostupid is there a easier way I can just make the character spawn in with a tool equipped and not able to unequip it that will not break the onserverevent part?

I think a easy way is just to parent the tool into the player’s character. About making a tool not unequipable, try a localscript under the tool,

script.Parent:GetPropertyChangedSignal("Parent"):Connect(function()
    script.Parent.Parent = game.Players.LocalPlayer.Character
end

Maybe adjust LocalPlayer with the player you desire in a server script if this doesn’t work.

As for the remote event, as I’ve said earlier it’s not required.

If you don’t want a player to unequip a tool then there isn’t an easy way to do so that I’m aware of unfortunately. The only way to do so that I’m aware of is to use ContextActionService to handle the function instead of a tool and then weld the handle part to the character’s hand to simulate the player holding the tool

I think there will be better ways to disable tool unequip though, just like game Bee Swarm Simulator. I will check and test some possible methods later.

Actually you can simply do

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)

in a localscript. I thought this only disables the gui but…

oh yes I could do that now i just need to find a way to equip the tool when the player join/character added.

To do that it’s fairly simple, you can simply do

game.Players.PlayerAdded:Connect(function(plr)
	local char = plr.CharacterAdded:Wait()
	local tool = game.ServerStorage:WaitForChild("Tool"):Clone() --You can also store in repstorage, but that's not safe
	tool.Parent = char
end)

in a normal script in serverscriptservice.

I tested with this method and remote events are working all fine. But anyways you won’t need the remote event.

yeah this works but the OnServerEvent still wont work.

Not really, I tested with the same thing, I did use remote events without any problems. Btw your remote event is not required.
Can you please show me all the descendants of the tool in serverstorage or where it’s stored? There’s no reason it won’t work as it’s working totally fine with me.

robloxapp-20231203-2106033.wmv (646.0 KB)

Have you really looked at our discussions? The remote event is not necessary and may cause performance issues, you dont need it.

i feel stupid I added a task.wait in my first script and everything works perfectly fine now.

1 Like

so ig the tool was equipping before the character loaded

You can just do local character = game.Players.LocalPlayer.CharacterAdded:Wait() at the start of your local script, that’s better than a task.wait()