I made a topic about this earlier but i couldnt really find out what to do.
Im using the Gui detection plugin where you can make GUIS do stuff when they touch each other.
I’ve tried to do some research about it (looking at the original post, etc) and im still really confused. Ill provide some screen shots below.
(ALSO, please remember that im new to roblox generally especially coding so it would be best to make the answer in a very simple form)
By the way, I did require the code and its the only thing i did when i placed the script into replicated storage
basically (atleast to my knowledge) I’ve made it so the “Frame” gets tweened into the Collider. when they touch, i want it to stop moving instead of going through it
local GuiCollisionService = require(game.ReplicatedStorage.GuiCollisionService)
local Frame = script.Parent.Frame
local Collider = script.Parent.Collider
GuiCollisionService.isColliding(Frame, Collider)
when i run the code, i get this
I have no idea what this means at all but it probably means im doing something incorrect.
If im doing anything wrong, please let me know.
(ALSO if there is a way to make it so when they collide it prints out something let me know!)
ALSO I MIGHT BE DOING EVERYTHING WRONG. If that is the case let me know!
(like all the script and the setup is wrong)
This error usually comes out when the module script fails to return. Module scripts are required to always return something i.e the basic setup being:
local Module = {}
return Module
if it fails to return, it’ll error and that message will print. It’s likely there is a typo somewhere in the code that may have been put in when you were either looking over its code, or even accidentally opening it and pressing a key without realization.
You’re misunderstanding, the actual GuiCollisionService script is what’s failing to return, not your own code, rather the script that’s having require() being ran on it.
local Replicated = game:GetService("ReplicatedStorage")
local Module = Replicated:WaitForChild("GuiCollisionService")
local GuiCollision = require(Module)