#why it not works
1 messages · Page 1 of 1 (latest)
local part = script.Parent
local touched = false
part.Touched:Connect(function(hit)
if touched then return end
local character = hit.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player then
touched = true
part.Transparency = 0
part.CanCollide = false
end
end)
@thin crown try this
also for that situation you should be using if hit.Parent:FindFirstChild("Humanoid") then
that has lots of useless stuff, we dont need to have a variable to check if its been touched already since we could just turn CanTouch off. Also having a seperate variable for character is useless.