Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Tycoon script fail, need help?

Output: 20:57:06.079 - Unable to create an Instance of type "StockSound"

I don't understand. Where did I go wrong? The script is where if you touch a door, you will claim that tycoon.

-- made by roboy5857

local gate = script.Parent.Parent
local door = script.Parent

local player = game.Players.LocalPlayer

function Claim()
		door.Transparency=0.5
	door.CanCollide=false
	if player.Humanoid == nil then
	wait(1)
	door.Name="Claimed"
	end
end

function onTouched(door)
	if player:onTouched(door) then
		if player.Humanoid == nil then
			Claim()			
		end
	end
end


2 comments

1

That error is pretty clearly not coming from this script.

0

Im a noob scripter, so maybe thats why.

1 answer

i think its because you do ~= nil for line 19 i think but im not entirely sure.

This discussion is preserved as it was. New answers, comments, and votes are closed.