Problem is, It won't even activate. Won't Print Activated at all. Yes, its a server script. And Its in Workspace, and FE is on.
AND IT WORKS IN STUDIO. AND ONLY IN STUDIO.
01 | local Char = script.Parent.Char |
02 | local Water = script.Parent.Liquid |
03 | local Button = script.Parent.Button |
04 | local CanClick = true |
05 | local Left = 10 |
06 | local Hats = script.Parent.Char:GetChildren() |
07 | local HeadOriginalCFrame = Char.Head.Frame |
08 |
09 |
10 | script.Parent.Button.ClickDetector.MouseClick:connect( function (Player) |
11 | print ( "Activated" ) |
12 | if CanClick = = true then CanClick = false |
13 | for i = 50 , 2 ,-. 2 do |
14 | Water.Mesh.Scale = Vector 3. new(Water.Mesh.Scale.X,Water.Mesh.Scale.Y-. 2 ,Water.Mesh.Scale.Z) |
15 | Water.Position = Vector 3. new(Water.Position.X,Water.Position.Y -. 02 ,Water.Position.Z) |
Not sure if you meant a GUI button or Part with a ClickDetector
Click Detector If you want to use a ClickDetector then you should make a model put the script inside there and put the the part in there with the ClickDetector. It might have been your directory. You should then insert this into the script. (You must use a regular script for this to work.)
1 | script.Parent.Button.ClickDetector.MouseClick:connect( function (Player) |
2 | print ( "Activated" ) |
3 | end ) |
GUI TextButton If you wanted to use a GUI button your event should be.
1 | script.Parent.TextButton.MouseButton 1 Down:connect( function (Player) |
2 | print ( "Activated" ) |
3 | end |
Text buttons do NOT use .MouseClick For a full list of the events that can be used please refer to the ROBLOX wiki page. http://wiki.roblox.com/index.php?title=TextButton
If you need any more help please contact me