aanoxx0
(aanoxx)
June 19, 2022, 6:50pm
1
I put a server script in a tool, but it doesn’t work.
Here’s the script:
local tool = script.Parent
local prompt1 = workspace:WaitForChild("ChipsModel"):WaitForChild("ProximityPrompt")
local prompt2 = workspace:WaitForChild("GiftCard"):WaitForChild("ProximityPrompt")
tool.Equipped:Connect(function()
prompt1.Triggered:Connect(function()
tool:Destroy()
end)
prompt2.Triggered:Connect(function()
tool:Destroy()
end)
end)
1 Like
Add a print in the triggered functions
aanoxx0
(aanoxx)
June 19, 2022, 6:52pm
3
I did but it didn’t work either.
It didn’t print anything? Let me try.
It works perfectly fine for me. Have you tried restarting studio, removing the WaitForChild, and making sure that no other scripts get involved with that.
Run this and tell me what is in the output
aanoxx0
(aanoxx)
June 19, 2022, 6:59pm
7
still doesn’t work at all, weird
Then the problem is with the tool send me the explorer page of your tool is there Handle and is the Tool’s property called :RequiredHandle on
Edit:
aanoxx0
(aanoxx)
June 19, 2022, 7:02pm
9
the property is ticked, maybe other scripts are interupting it.
When you are equipping the tool does the handle show up on the arm normally or it doesnt show up
aanoxx0
(aanoxx)
June 19, 2022, 7:03pm
11
it does show up normally, roblox scripts are so hard to understand
aanoxx0
(aanoxx)
June 19, 2022, 7:05pm
12
maybe it’s because it is a server script?
Nope that shouldnt be problem try remaking it from scratch Make new tool add the handle in it and just do Equipped event in local script and print in it
aanoxx0
(aanoxx)
June 19, 2022, 7:09pm
14
i put the print in a local script and it worked
aanoxx0
(aanoxx)
June 19, 2022, 7:13pm
15
lua is so weird sometimes, i hate it
aanoxx0
(aanoxx)
June 19, 2022, 7:15pm
16
i’ll try using a remote event, maybe it’ll work