So here is my Script using .Touched and .KeyDown .
function debounce(func)
local isRunning = false
return function(...)
if not isRunning then
isRunning = true
func(...)
isRunning = false
end
end
end
script.Parent.Touched:connect(debounce(function(player)
if player.Parent and game.Players:GetPlayerFromCharacter(player.Parent) then
plr = game.Players:GetPlayerFromCharacter(player.Parent)
print("Work1")
mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key)
if key:lower() == "r" then
print("Work2")
game.Workspace.Int.Value = true
end
end)
end
end))
So as you see, when the player touch's the brick, it is supposed to print "Work1". This works fine in Play Solo, but will not print using Start Server. Why does this not work? All help appreciated, Thank You. ~ Xduel

5 comments
One comes up that reads "An Error Has Occured", but that is one I have always gotten. I switched to see what was happening on the server's screen rather than Players, and got "Workspace.Part.Script:20: attempt to index global 'mouse' (a nil value)"
Oh, Strange how it works in Play Solo. Must have to do with the server. Now this may be to much to ask, but do you have any suggestions for other methods to get the players mouse? Don't feel like you have to answer, I can always research it,
There is no way to get a player's mouse server side, as it only exists to the client (just like the player's camera). I recommend either completely converting your script to a LocalScript distributed with StarterPack, or use BindableEvents to communicate between this script and a client sided script.
Bindable Events? I've heard of BIndable variables, I'll go research that. Thank You for the help!
Anytime!