hello im trying to make it so the player cant unequipt there flashlight since thats not a feature i want. how would i do this?
i tried making an animation and i set the priority to core but it only works when im holding the flashlight and doesnt lock the player from unequipting it.
script: (i put in player scripts)
local Players = game:GetService("Players")
local Character = Players.LocalPlayer.Character
if not Character then
Character = Players.LocalPlayer.CharacterAdded:Wait()
end
local humanoid = Character:WaitForChild("Humanoid")
local myanimegirl = Instance.new("Animation")
myanimegirl.AnimationId = "rbxassetid://8466085144"
local myanimegirltoplay = humanoid:LoadAnimation(myanimegirl)
while true do
print("Playing")
myanimegirltoplay:Play()
wait(2)
end
unequipting the flashlight in my game is malicious and explotious since it ruins the experience unfairly for other players bringing users away from the roblox community and potentially hindering others from experiencing a creative enviroment killing there aspirations and dreams of things like developing for roblox.
this is why its essential this malicious issue needs to be fixed
okay so you can Disable the whole Backpack core gui using StarterGui:SetCoreEnabled() i mean yes exploiters can still enable the backpack up again and unequip the tool OR you can use the Tool.Unequipped to check when the tool is unequipped, you can put the tool back in the player’s hand by changing the tool.parent to the player’s character. or you can even use Humanoid:EquipTool() to change the equip their tool once they unequip it?
cant you just do AnimationTrack.Loop and set it to true instiad of doing this?
doing this isn’t really efficient, since this script is located inside StarterPlayerScript correct? okay so the only reason this isnt efficant is becuase a local script fires when the player joins.
i mean yes you have CharacterAdded:Wait() in there but lets say the player respawns the Character variable wont be accounted for since basicly when the character dies and spawns as a character it updates the Player.Character so thats why it isnt accounted for, so this would only run once.
exaclty, you can force em to have it equipped. you just gotta check whent hey unequip the tool. with the Tool.UnEquipped. since once its unequipped the tools gets parented inside the player’s backpack. so when its placed into the backpack just place it back into the player’s character instance.