generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: hellllppp>???

Previous Thread :: Next Thread 
brados123 is not online. brados123
Joined: 24 Nov 2012
Total Posts: 2143
10 Oct 2015 03:58 AM
can i use a mouse over function instead of down for a brick with a click detector?






thanks guys
Report Abuse
distalDigitPhalanx is not online. distalDigitPhalanx
Joined: 25 Jan 2015
Total Posts: 1509
10 Oct 2015 04:06 AM
It can be done, but it's not as simple as when using ClickDetectors. Be aware that the following *will* work with FE, but ClickDetectors won't.

Put the following in StarterPlayerScripts:

player = game.Players.LocalPlayer
mouse = player:GetMouse()

while true do
if mouse.Target ~= currentHoverTarget then
if currentHoverTarget ~= nil then
if currentHoverTarget:findFirstChild("HoverDetector") then
currentHoverTarget.HoverDetector:FireServer(false)
end
end
currentHoverTarget = mouse.Target
else
return
end

if mouse.Target then
if mouse.Target:findFirstChild("HoverDetector") then
mouse.Target.HoverDetector:FireServer(true)
end
end

game:GetService("RunService").RenderStepped:wait()
end


Then put a RemoteEvent instance inside every part you want to have a 'HoverDetector'. The RemoteEvents have to be called 'HoverDetector', or this wont work. To detect when the mouse enters or leaves the part, put the following in a *server* script, i.e. normal script.

part.HoverDetector.OnServerEvent:connect(function(state)
if state == true then
part.BrickColor = BrickColor.Red()
else
part.BrickColor = BrickColor.Blue()
end
end)
Report Abuse
brados123 is not online. brados123
Joined: 24 Nov 2012
Total Posts: 2143
10 Oct 2015 04:34 AM
no.

I am a scripter, I just testing.

But btw, if you dont know, you could just use script.parent.--mousehover--.

Instead, its easier.
thanks guys
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image