|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 21 Jul 2016 11:54 AM |
is there a way to put a wait limit?
|Help A Homie Out| |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
|
| 21 Jul 2016 12:56 PM |
What's Else And Bump1
|Help A Homie Out| |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|