RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Write me a script that causes the player to smoke for a duration after touching a part"
-- server script local part = script.Parent local smokeDuration = 5 local function startSmoke(character) local smoke = Instance.new("Smoke", character.Head) smoke.Enabled = true wait(smokeDuration) smoke.Enabled = false smoke:Destroy() end local function onTouch(hit) local character = hit.Parent local humanoid = character:FindFirstChild("Humanoid") if humanoid then startSmoke(character) end end part.Touched:Connect(onTouch)