#Events

1 messages · Page 1 of 1 (latest)

hushed snow
#
local Part = game.workspace.TouchPart
local TouchPart = game.Workspace.TouchPart


TouchPart.Touched:Connect(function(touched)
    if TouchPart == true then
        TouchPart.Color = Color3.fromRGB(118, 255, 55)
    end
end)

I am extremely confused with why this event doesn't work and even more confused as to what the parameter in the function is used for??

golden wyvern
hushed snow
#

Also why didn't it work with the if statement?

golden wyvern
golden wyvern
golden wyvern
hard micaBOT
#

studio** You are now Level 5! **studio

hushed snow
#

Thanks so much

golden wyvern
#

np

light cargo
light cargo
hushed snow
#
local Part1 = game.Workspace.Part1

while true do
    Part1.Touched:Connect(function(touched)
        task.wait(1)
        Part1.Color = Color3.fromRGB(82, 47, 255)
    end)
    
    Part1.TouchEnded:Connect(function(touchened)
        task.wait(1)
        Part1.Color= Color3.fromRGB(81, 81, 81)
    end)
end

``` this better?
nimble vale