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: I Need Help (Not A Game Request but actual scripting)

Previous Thread :: Next Thread 
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 11:14 AM
Ive been trying to make a script where when you hover your mouse over the brick it becomes half transparent or 0.5 transparency, but ive had no luck. Could someone tell what wrong with this script

if mouse.Target then
if mouse.Target.Name = "Part23" then
mouse.Target.Transparency = 0.5


|Help A Homie Out|
Report Abuse
killerbot29003 is not online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
21 Jul 2016 11:16 AM
local mouse = game.Players.LocalPlayer:GetMouse()

mouse.Move:connect(function()
if mouse.Target and mouse.Target.Name == "Part23" then
mouse.Target.Transparency = .5
end
end)


This siggy is copyrighted ©
Report Abuse
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 11:24 AM
it didn't work so i thought maybe if it went directly to the block it would work but no cigar here's the altered version

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

mouse.Move:connect(function()
if mouse.Target and mouse.Target == game.workspace.Part23 then
mouse.Target.Transparency = 0.5
end
end)

anyone have any experience with stuff like this?


|Help A Homie Out|
Report Abuse
RobuxLife is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
21 Jul 2016 11:25 AM
put this in a localscript in starterpack

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

mouse.Move:connect(function()
if mouse.Target and mouse.Target.Name == "Part23" then
mouse.Target.Transparency = .5
end
end)



Report Abuse
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 11:30 AM
Thank you so much but how could i change it so it only changes when your mouse hovers over it?


|Help A Homie Out|
Report Abuse
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 11:54 AM
is there a way to put a wait limit?


|Help A Homie Out|
Report Abuse
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 12:05 PM
I've Tried to change it so it go back to how it was before you hover your mouse on the brick but it didnt work the way i wanted to could someone tell what i did wrong

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Move:connect(function()
if mouse.Target and mouse.Target.Name == "Part23" == true then
mouse.Target.Transparency = .5
if mouse.Target and mouse.Target.Name =="Part23" == false then
game.workspace.Part23.Transparency = 1
end
end)


|Help A Homie Out|
Report Abuse
RobuxLife is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
21 Jul 2016 12:08 PM
local mouse = game.Players.LocalPlayer:GetMouse()

mouse.Move:connect(function()
if mouse.Target and mouse.Target.Name == "Part23" then
wait(3) -- you can change this
mouse.Target.Transparency = .5
end
end)


Report Abuse
RobuxLife is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
21 Jul 2016 12:19 PM
change your script:

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

mouse.MouseMove:connect(function()
if mouse.Target and mouse.Target.Name == "Part23" then
wait(3) -- you can change this
mouse.Target.Transparency = .5
end
end)



Report Abuse
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 12:21 PM
sorry for being indirect but i meant when your mouse isnt on the block it goes back to the way it was


|Help A Homie Out|
Report Abuse
Weirdraidercs35 is not online. Weirdraidercs35
Joined: 14 May 2015
Total Posts: 2275
21 Jul 2016 12:32 PM
ever heard of else ?
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
21 Jul 2016 12:55 PM
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Move:connect(function()
if mouse.Target and mouse.Target.Name == "Part23" then
mouse.Target.Transparency = .5
else
game.workspace.Part23.Transparency = 1
end
end)

You were so close!
Report Abuse
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 12:56 PM
What's Else
And Bump1



|Help A Homie Out|
Report Abuse
RockDownBiever is not online. RockDownBiever
Joined: 09 Oct 2011
Total Posts: 84
21 Jul 2016 01:04 PM
Nvm elese is just what i need
heres the script for anyone who passes by and reads the forum

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Move:connect(function()
if mouse.Target and mouse.Target.Name == "Part23" == true then
mouse.Target.Transparency = .5
else
game.Workspace.Part23.Transparency = 1
end
end)



|Help A Homie Out|
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