-
What do you want to achieve? loop check if a player has stringvalue inside them before and whilst touching part
-
What is the issue? Background transparency and animation DOES NOT stop when player gets stringvalue mid way through (or insidepart)
-
What solutions have you tried so far? Tried everything
Here is my script, it is local ofcourse (StarterCharacter)
while task.wait(0.05) and not parent:FindFirstChild("Morphed") and not parent:FindFirstChild("Immune") do
function onTouchEnded(part)
local player = getPlayerFromRootPart(part)
if not player then return end
local index = table.find(playersTouching, player)
if not index then return end
table.remove(playersTouching, index)
local moprhed = parent:FindFirstChild("Morphed")
if moprhed == nil then
tween:Cancel()
anim:Stop()
task.wait(0.1)
TweenService:Create(frame, TweenInfo.new(0.5), {Transparency = 1}):Play()
print("Exited", player)
end
end
end