#I dont understand why the tool is being activated when im not even clicking

30 messages · Page 1 of 1 (latest)

near sandal
#

what im trying to do is make it to wear if you want the door to disapear, you have to be touching the door with a key and click. but for some reason im not even clicking and its apparently working. its something to do with "tool.activated" but i dont know whats wrong

Im a beginner 😦

dire eagle
#

I would just add a Tool.Activated function inside that function. And switch .Touch to a touchstarted and a touchended event. Touchstarted connecting the tool activated event and touchended disconnecting it

#

Yes this is a tad advanced for a beginner but else it will not behave the way you wish

#

I can make the rough script for you in 8h when I’m back home

near sandal
#

@dire eagle thanks for help, i would love it if you can make the script for me.

storm sandal
#
if hit.Parent = "Key" then
if key.Activated then
game.workspace.Door:Destroy()
end
end
near sandal
#

nothing happens

storm sandal
#

really?

#

let me test it real quick\

near sandal
#

alr

#

the other person said its something do with tool.activated

storm sandal
#

figured it out

#

@near sandal

#

it was ez

near sandal
#

so what was wrong

storm sandal
#
local door = workspace.Part
local key = script.Parent
local sessionnum = 0
key.Activated:Connect(function()
    if sessionnum == 1 then
        door:Destroy()
    end
end)

door.Touched:Connect(function(hit)
    if hit.Name == key.Handle.Name then
        sessionnum = 1
    end
end)```
#

the door not gonna respawn right?

#

if it gonna respawn

#

then i have to change the script

near sandal
#

nah its not gonna respawn

pale narwhalBOT
#

studio** You are now Level 1! **studio

near sandal
#

@storm sandal oh wow

#

it works

#

without it even being complicated

#

thanks

storm sandal
#

ok