Script doesnt work even though there is no errors at all

so basically im trying to make a part do something when the tool is in a specific mode

the scripts for example

module in tool
image
local in tool
image

so then i added a part and wrote this script
image
but it does nothing when i click on the part, how can i fix this? there is no errors too.
(the part is meant to make the player jump btw)
and also ignore the glovemode error thats a common error in the tool itself and it still works

4 Likes

so havent read your post, but mostly when it wont print a error its a logical script… anyways ill get back to reading your post!

1 Like

GloveModes.JumpPlatform() doesn’t return anything… so that if statement will never be true, and it won’t run.

4 Likes

one request can you send me a video when you try it out… and i just wanna inform you just in case that you set the click function as “RightMouseClick”

oh and another thing is most of these click functions have ‘:connect(function()’ for ex:
Click.RightMouseClick:Connect(function()

end

1 Like

The problem I see here is that you’re requiring the module from StarterPack and then using script.Parent in that module. Instead, try using require(script.Parent.GloveModule)

2 Likes

the right click is for changing modes tho… anyways here is ya video

ahhh… maybe @hey_imworst is right… try it out!!

oh and i told you this for more info cuz i havent seen anyone not put :connect

2 Likes

but the script parent in the module is for putting the script in that to the part with the script in it

1 Like

have you tried putting a “:connect”?

Can you explain what you’re trying to do again? Requiring the module from the tool the player is using itself should be working fine.

changing a part’s mode only on a specific mode tool is using.
and about this

somehow this doesnt work

can you give a screenshot of the whole module scripts ect?

if GloveMode.JumpPlatform() then
    PlatformMode.JumpPlatform()
end

The above code in the if statement will never run. Your function JumpPlatform does not return anything!

1 Like

The event for click detector click detection is Right Mouse click , you have to connect events so do

local Click = script.Parent.ClickDetector
Click.RightMouseClick:Connect(function()
 -- Rest of the Code
end)

i already did in the original post???

Can I see your explorer in studio? I don’t understand why that wouldn’t be working.

i see… but when i put == for it it doesnt work and it gives more errors

you didnt it needs to connect all you typed was:
Click.RightMouseClick(function()