You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2023. It is now read-only.
local GuiCollisionService = require(game:GetService("ReplicatedStorage").GuiCollisionService)
local group = GuiCollisionService.createCollisionGroup()
group:addHitter(script.Parent.Move, {}) -- Player or character
group:addCollider(script.Parent.Still, false) -- Add collision
group:addCollider(script.Parent.Still2, false) -- Add collision
group:addCollider(script.Parent.Still3, false) -- Add collision
-- You can add more collisions
-- group:addCollider(COLLISION, false)
local connection;
connection = group:getHitter(1).CollidersTouched.Event:Connect(function(hits)
if hits then
-- HERE YOU CODE
hits[1]:Destroy() -- Destroy collision
--connection:Disconnect() -- If you want stop this script
end
end)
EXAMPLE 2
local GuiCollisionService = require(game:GetService("ReplicatedStorage").GuiCollisionService)
local group = GuiCollisionService.createCollisionGroup()
group:addHitter(script.Parent.Move, {}) -- Player or character
group:addCollider(script.Parent.Still, false) -- Add collision
group:addCollider(script.Parent.Still2, false) -- Add collision
group:addCollider(script.Parent.Still3, false) -- Add collision
-- You can add more collisions
-- group:addCollider(COLLISION, false)
group:getHitter(1).CollidersTouched.Event:Connect(function(hits) -- If player started touching collision
group:getHitter(1).BackgroundColor3 = Color3.new(0.333333, 1, 0) -- Change background player
end)
group:getHitter(1).OnCollisionEnded.Event:Connect(function() -- If player stopped touching collision
group:getHitter(1).BackgroundColor3 = Color3.new(0.0862745, 0.0862745, 0.0862745) -- Change background player
end)
Sorry for my bad english.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This not working(
TEST.312.mp4
The text was updated successfully, but these errors were encountered: