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

What can I do?

I know this this can only work on LocalScripts, but what can I do to make it when a player touches the part, and then presses the letter to activate the other part?

local Player = game.Players.LocalPlayer
local mouse = Player:GetMouse()

script.Parent.Touched:connect(function(hit)
	mouse.KeyDown:connect(function(Key)
		if Key == "f" then
			game.Workspace.TestDoor.Transparency = 1
		end
	end)
end)

1 answer

Your program isn't running because you're putting a local script in a part. Local scripts only work inside the starter Gui, or starter pack.

1 comment

0

To correct you- Local scripts are functional in Characters and players. (Characters being the model in workspace, Players being the Player its self in Players

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