hi, I’m trying to learn scripting and i have made some progress, but i have problem:
im trying to set boolean value to true when tool equipped but it just does nothing
script.Parent.Equipped:Connect(function()
workspace:WaitForChild("KeyOpen").Value = true
script.Parent.Parent.Handle.equip:Play()
end)
script.Parent.Unequipped:Connect(function()
script.Parent.Handle.equip:Play()
workspace:WaitForChild("KeyOpen").Value = false
end)
idk if im doing something wrong. Help please ¯\(ツ)/¯
is your code a localscript?
check your output for “InfiniteYieldPossible”
yea, its a local script, i tried to do that with RemoteEvent, it didnt work
there’s no messages “InfiniteYieldPossible”
are you checking if the value changed on your client or sever?
both of them have false value
try passing your code to a normal Script
Equipped is not a valid member of Part “Workspace.Key.Handle”
i think local script will not change a bool value because bool is a serverside
put the script inside the tool no the handle.
You’re getting this as you’re telling the code to detect when the handle gets Equipped and handle has no property or event named “Equipped”
I will change system with remote events again
that worked! thanks!
and thanks V3lvics too! =D
1 Like
system
(system)
Closed
#12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.