Can't make script work lighter

Hello, the title doesn’t make since I know, but I need help. I don’t know how to make my script disable a tool that is in the players hand. I want the “flicker” to enable and disable the local script that is in the lighter but I tried backpack and it won’t work because the lighter is in the players hand. I just need help. Thank you!

Script:

game.Workspace.flicker.Touched:Connect(function(hit)
local isModel = hit:FindFirstAncestorWhichIsA(“Model”)
if isModel then
local IsHumanoid = isModel:FindFirstChild(“Humanoid”)
if IsHumanoid then
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player then
Player.Backpack.GoodLighter.Effects.Fire.Enabled = false
Player.Backpack.GoodLighter.Effects.Flare.Enabled = false
Player.Backpack.GoodLighter.Effects.Sparks.Enabled = false
Player.Backpack.GoodLighter.Effects.Light.Enabled = false
wait(0.3)
Player.Backpack.GoodLighter.Effects.Fire.Enabled = true
Player.Backpack.GoodLighter.Effects.Flare.Enabled = true
Player.Backpack.GoodLighter.Effects.Sparks.Enabled = true
Player.Backpack.GoodLighter.Effects.Light.Enabled = true
wait(0.3)
Player.Backpack.GoodLighter.Effects.Fire.Enabled = false
Player.Backpack.GoodLighter.Effects.Flare.Enabled = false
Player.Backpack.GoodLighter.Effects.Sparks.Enabled = false
Player.Backpack.GoodLighter.Effects.Light.Enabled = false
wait(0.3)
Player.Backpack.GoodLighter.Effects.Fire.Enabled = true
Player.Backpack.GoodLighter.Effects.Flare.Enabled = true
Player.Backpack.GoodLighter.Effects.Sparks.Enabled = true
Player.Backpack.GoodLighter.Effects.Light.Enabled = true
wait(0.3)
Player.Backpack.GoodLighter.Effects.Fire.Enabled = false
Player.Backpack.GoodLighter.Effects.Flare.Enabled = false
Player.Backpack.GoodLighter.Effects.Sparks.Enabled = false
Player.Backpack.GoodLighter.Effects.Light.Enabled = false
wait(0.3)
Player.Backpack.GoodLighter.Effects.Fire.Enabled = true
Player.Backpack.GoodLighter.Effects.Flare.Enabled = true
Player.Backpack.GoodLighter.Effects.Sparks.Enabled = true
Player.Backpack.GoodLighter.Effects.Light.Enabled = true
end
end
end
end)

2 Likes

@anygamesalldaylong hey there mate you didn’t put the code in to make it lighter that’s probably why try that and see how it goes for time 1st time Ik history!

3 Likes

I just now tried and it says: GoodLighter is not a valid member of Backpack “Players.anygamesalldaylong.Backpack”

I assume this is because the player is holding it but what would I do if the player is holding it?

1 Like

@anygamesalldaylong mate I think you could be too worry about it. If the player holding it could be a good thing if your making a game be creative that could be their weapon to Energy something in the game like Plaistow charges
See how that goes :ok_hand:

1 Like

This is a scripting issue not a creative design thing.

1 Like

@anygamesalldaylong Oh right mate sorry I just got a bit confuse that’s all so if it’s the coding thing just restart it u know delete the code and put it back in again and click save that might work for u

Dude I don’t think you understand lol I need help fixing the script so when the player holds the lighter it flickers on and off.

1 Like

@anygamesalldaylong OK mate!… Good Mate lol.
Just look at a YT video of how to fix it. I
Think The Devking or whatever his channel is.
They do that stuff other there but idk how much

1 Like

Dude are you not a scripter? There is no video therefore I came here.

@anygamesalldaylong I think I am mate. Well my mate show me one video about that.
But it didn’t do well tho what did u type up?

how to make tool script be disabled from player hand roblox

1 Like

@anygamesalldaylong Oh mate that’s why it didn’t come up u did it wrong. Don’t but hand just put how to take it off Roblox. Or look few a famous video about it like The Dev king or flamingo or the man himself PewDiePie.

how to disable script in tool is what I just now but in and nothing

@anygamesalldaylong Ok did you put The Devking has well?

yea but it isn’t what I need. I don’t think you understand.

@anygamesalldaylong look mate I have to be careful with this business deal but I didn’t understand the whole time I was just trolling u and making jokes I was trying to help u tho but it didn’t work Lol sorry

Bruh actually try and help just look at the script.

@anygamesalldaylong mate I tell u before my Final real answer is u did the coding wrong

Why are you referencing tools in Player.Backpack?

Player.Backpack.GoodLighter.Effects.Fire.Enabled = false
1 Like

I did that thinking the tool would stay in the players backpack but it doesn’t and goes into the player itself I need help figuring out how to make it work when the player is holding it.

1 Like