actually just hold on im gonna record a video showing everything
as @Razor_IB said âyou have to connect eventsâ now what you showed us in the screenshot was:
Click.MouseRightClick(function()
ir maybe you changed the script already and still not working which is odd
putting a == for the if statement just makes the jumpplatform a unknown global
i see it in the main video:
-
You are not connecting the RightMouseClick event to a function , you are directly calling it.
-
GloveMode.JumpPlatform â This function returns nil upon calling so your if condition :
if GloveMode.JumpPlatform() then
will never run.
because the right click is for changing modes for the glove
i dont think you really get what we are saying here⌠id like you to try adding this:
Click.RightMouseClick:Connect(function()
i already did and doesnt work
You have to connect events to function , else it wonât run . You canât call events like functions . Also read the second thing I told again.
This wonât make any difference⌠itâs been said 2 times that the if statement isnât ever going to run-
@BuilderityRBLX Put a print
inside the MouseClick event before the if statement, and you should see it print. Put it inside that if statement, it wonât print. Your function never returns and the if statement doesnât run.
ok so i fixed everything i think but the only error now is the if statement
and how do i fix that if statement
?
trying to figure it out right nowâŚ
off topic but how do u do the quote thing like how you show a certain part of someoneâs comment im new to the forum so
just select the specific text and there will be a quote button above it!
Make the JumpPlatform function return any value
i dont know anything about returning value stuff âŚ
First, add this to JumpPlatform() function in your script. (Last Line)
return true
Then, change your clickdetector script to this(also make it a local script and put it in starterpack):
local clickdetector = game.workspace:FindFirstChild("TheNameOfTheClickDetectorPart").ClickDetector
clickdetector.RightMouseClick:Connect(function()
local PlatformMode = require(script.PlatformMode)
local GloveMode = require(game.Players.LocalPlayer.Backpack.Tool.GloveModule)
local modulefunction = GloveModule.JumpPlatform()
if modulefunction == true then
PlatformMode.JumpPlatform()
end
end)
that gave me a idea
yes, starter gear does replicate in clients⌠meaning that thats better to do!! and mostly could fix the problem
nope, still didnt work
@BuilderityRBLX it whould fix the problem since if you call the StarterGear it whould mean its the server⌠but when you call the main playerâs backpack it whould work, maybe what was happening is the connect thing and the second problemo was the server could see it but not the client⌠anyways
making it short whould be:
ur calling the tool on StarterGear meaning it does the changes to the server and not the client