Events Not working properly

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I Want My Part Turn The Color into Green when i touched it. but when i play/run the game. the part’s color is becoming green without i touched it

  2. What is the issue? but when i play/run the game. the part’s color is becoming green without i touched it

  3. What solutions have you tried so far? Not Founding

May I see your code?
If you have just attached the .Touched event and not checked if it was a player touching the part, then it would have detected touching the baseplate.
Let me give you a working example of that.

local part = game.Workspace.Part

part.Touched:Connect(function(hit)
    if not hit.Parent:FindFirstChild("Humanoid") then return end
    -- Change the colour of the part here
    part.Color = Color3.fromRGB(0,255,0)
end)

Something like that would work. Of course, you could set the if statement up differently, but that is up to you.

2 Likes
script.parent.Touchd:Connect(function()
     script.parent.BrickColor = BrickColor.new("Sea Green")
end

sorry i forgot to post my my code. btw working! thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.