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

Why isn't my VIP script working?

 local vipmembers = {"Roboy5857", "tyresse"}
vip = game.Workspace.VIPDoor

function onTouched(vip)
	if vipmembers:onTouched(vip) then
		vip.Transparency = 1
		vip.CanCollide = false
		wait(2)
		vip.Transparency = 0
		vip.CanCollide = true
	end
end

script.Parent.Touched:connect(onTouched)

When I go online.. it doesn't work. Why?

3 comments

0

Why did i get a vote down. My question is fine.

0

About to answer. (Just voted you up to reset it back to 0)

0

Thanks

1 answer

✓ Accepted answer

Put this script in the door.

VIP_Members = {"Roboy5857", "tyresse"}
door = script.Parent
door.Touched:connect(function(hit)
	if hit.Parent and hit.Parent:findFirstChild("Humanoid") and game.Players:GetPlayerFromCharacter(hit.Parent) then
		p = game.Players:GetPlayerFromCharacter(hit.Parent)
		for i,v in pairs(VIP_Members) do
			if p.Name == v then
				door.Transparency = 0.7
				door.CanCollide = false
				wait(0.5)
				door.Transparency = 0
				door.CanCollide = true
			end
		end
	end
end)

~ Thank me by accepting this answer/bumping up my reputation.

2 comments

0

Thanks it works!! :D

0

Mind accepting the answer?

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