ReplicatedStorage.GuiCollisionService:298: argument must be a boolean - Client - GuiCollisionService:298
Stack Begin - Studio
Script 'ReplicatedStorage.GuiCollisionService', Line 298 - function addCollider - Studio - GuiCollisionService:298
Script 'Players.killersuperlegend.PlayerGui.ScreenGui.ObstacleDodger.LocalScript', Line 7 - Studio - LocalScript:7
Stack End
What do you mean by that exactly? Oh and btw, I forgot to mention I managed to fix that kinda, but it gave me instead some other error, this is my code:
wait(3)
local GuiCollisionService = require(game.ReplicatedStorage.GuiCollisionService)
local group = GuiCollisionService.createCollisionGroup()
group:addCollider(script.Parent.Pipe1, true)
group:addCollider(script.Parent.Pipe1.PipeTop, true)
group:addCollider(script.Parent.Pipe1.PipeBottom, true)
group:addCollider(script.Parent.Pipe2, true)
group:addCollider(script.Parent.Pipe2.PipeTop, true)
group:addCollider(script.Parent.Pipe2.PipeBottom, true)
group:addHitter(script.Parent.Frame)
group:getHitter(1).CollidersTouched.Event:Connect(function(hits)
group:getHitter(1).BackgroundColor3 = Color3.new(0.333333, 1, 0)
end)
group:getHitter(1).OnCollisionEnded.Event:Connect(function()
group:getHitter(1).BackgroundColor3 = Color3.new(255,255,255)
end)
local player = game.Players.LocalPlayer
local RS = game:GetService("RunService")
RS.RenderStepped:Connect(function()
script.Parent.Position = UDim2.new(0, player:GetMouse().X, 0, player:GetMouse().Y)
end)
And this is the other error I got after adding true after each instance in the addCollider()s:
ReplicatedStorage.GuiCollisionService:244: argument must be a table - Client - GuiCollisionService:244
Stack Begin - Studio
Script 'ReplicatedStorage.GuiCollisionService', Line 244 - function addHitter - Studio - GuiCollisionService:244
Script 'Players.killersuperlegend.PlayerGui.ScreenGui.ObstacleDodger.LocalScript', Line 12 - Studio - LocalScript:12
Stack End
Pass in an empty table as the 2nd argument in addHitter(). The 2nd argument is a table of tweens which will play if the hitter collides with a collider, in your case, you don’t have any tweens to play, thus and empty table.
Thank you! It works, for the most part, the part now changes to green when it touches any of those parts, but also a Frame called Background gets affected, the whole thing moves with the cursor.
Nope, I had it before, but I tried removing it but it the Background still moves with the cursor for some reason, I don’t really have any codes that does anything with the cursor
Edit: I SOMEHOW didn’t notice that in the code O_O, sorry!
The code works perfectly fine after removing that part of the code.
Thank you so much for helping me, your code is amazing!
Have an awesome day/night!
I’m getting ReplicatedStorage.Modules.GuiCollisionService:120: attempt to index nil with 'x' when I try to do if GUICollision.isInCore(ItemBox, script.Parent.Inventory) then
I was trying to figure out why the OnCollisionEnded event kept firing more and more times while the game was running and came across this code here. It’s creating a new listener event every frame and firing them all at once when the GUI exits another frame.
necropost but I wanted to put this out there for anyone who comes across this in the future
This module has a VERY difficult time when destroying the colliders. It’s kind of a fatal flaw, the module does not work. When I :Destroy() an object, I expect the collider to stop working. Even when I destroy the collider using the method given, it breaks other colliders because my colliders are being created and destroyed pretty rapidly.
Hi, I am trying to make the collisions work, but for some reason when the player walks right next to specific colliders, the ‘Colliding’ value turns to true and the player just gets stuck there… Here’s what I mean (when I walk past the cave, it works as intended, but when I walk past the house next to it, the bug occurs):
I can’t come up with any solutions, is there anything I could do to fix this?
EDIT: I noticed that it usually only happens if i’m walking next to a collider on the collider’s left side