How to disable unequipting a flashlight

this doesnt work. the player is able to hold and unequipt both

then i guess there is no other way just live with it then

like i said thats not a possibility. the game requires the flashlight but also requires it to be non equiptable and instead toggled on and off by click

ok guys the flashlight is a child of backpack. disabling it disables it children as well so the only pay is to make a script that when a player joins the game clone the flashlight and make the parent the player then position the flashlight in front of them and play the holding animation

the only way is to make a script that when a player joins the game clone the flashlight and make the parent the player then position the flashlight in front of them and play the holding animation
do you guys know how to do this

Put the flashlight in ReplicatedStorage

game.Players.PlayerAdded:Connect(function(player)
	print(player.Name)
	local char = workspace:FindFirstChild(player.Name)
	local clone = game.ReplicatedStorage.Flashlight:Clone()
	clone.Parent = char
local holdingAnimation = --define
char:WaitForChild("Humanoid").Animator:LoadAnimation(holdingAnimation):Play()
	end)

so make a local script in starter scripts

game.Players.PlayerAdded:Connect(function(player)
	print(player.Name)
	local char = workspace:FindFirstChild(player.Name)
	local clone = game.ReplicatedStorage.Flashlight:Clone()
	clone.Parent = char
local holdingAnimation = "rbxassetid://8466085144"
char:WaitForChild("Humanoid").Animator:LoadAnimation(holdingAnimation):Play()
	end)

right

This script I made was designed to be a server script.

Btw, you should make an Animation instance in ReplicatedStorage or something.

Then change the local holdingAnimation thing to that thing in the Replicatedstorage.

yea that didnt work. i checked in the players tab, local player and theres no flashlight or anything

no error or warning though

Did you check the character?

Show me your Explorer tab.

imageits in backpack but backpacks disabled

image

Is there a flashlight in the character?

im not seeing any. are you sure to put it in replicated storage and not server storage???

You can parent the flashlight to anything. Just make sure to edit the script once doing so.

Show me the character in the Explorer and what it has in it.

also i put the script in game.serverscriptstorage

Do you mean ServerScriptService?

Also, that should be fine.

image